]> Dogcows Code - chaz/openbox/blobdiff - openbox/openbox.c
move the focus_order lists into the kernel
[chaz/openbox] / openbox / openbox.c
index b10659297e48d616b474728154bfe73813b9ec5a..9f90a9e01e729e7a2a1d2e149c75ac2819ae5946 100644 (file)
@@ -8,6 +8,7 @@
 #include "focus.h"
 #include "extensions.h"
 #include "gettext.h"
+#include "grab.h"
 #include "engine.h"
 #include "themerc.h"
 #include "plugin.h"
@@ -137,10 +138,13 @@ int main(int argc, char **argv)
        screen_startup();
        focus_startup();
        client_startup();
+        grab_startup();
         plugin_startup();
 
         /* XXX load all plugins!! */
-        plugin_open("foo");
+        plugin_open("focus");
+        plugin_open("keyboard");
+        plugin_open("mouse");
 
        /* get all the existing windows */
        client_manage_all();
@@ -153,8 +157,10 @@ int main(int argc, char **argv)
 
        client_unmanage_all();
 
-        plugin_shutdown();
+        plugin_shutdown(); /* calls all the plugins' shutdown functions */
+        grab_shutdown();
        client_shutdown();
+       focus_shutdown();
        screen_shutdown();
        event_shutdown();
        engine_shutdown();
@@ -162,7 +168,7 @@ int main(int argc, char **argv)
        render_shutdown();
        timer_shutdown();
     }
-         
+
     XCloseDisplay(ob_display);
 
     dispatch_shutdown();
@@ -174,7 +180,10 @@ int main(int argc, char **argv)
 
 void signal_handler(const ObEvent *e, void *data)
 {
-    switch (e->data.signal) {
+    int s;
+
+    s = e->data.s.signal;
+    switch (s) {
     case SIGUSR1:
        g_message("Caught SIGUSR1 signal. Restarting.");
        ob_shutdown = ob_restart = TRUE;
@@ -188,12 +197,12 @@ void signal_handler(const ObEvent *e, void *data)
     case SIGINT:
     case SIGTERM:
     case SIGPIPE:
-       g_message("Caught signal %d. Exiting.", e->data.signal);
+       g_message("Caught signal %d. Exiting.", s);
        ob_shutdown = TRUE;
        break;
 
     case SIGFPE:
     case SIGSEGV:
-       g_error("Caught signal %d. Aborting and dumping core.",e->data.signal);
+       g_error("Caught signal %d. Aborting and dumping core.", s);
     }
 }
This page took 0.022761 seconds and 4 git commands to generate.