]> Dogcows Code - chaz/openbox/blobdiff - openbox/openbox.c
all my changes while i was offline.
[chaz/openbox] / openbox / openbox.c
index 9dd50985daa0b138d4fcc027992ffc262e871b3c..304d52c6f27abe3c7332458bdec5a82bd509af0b 100644 (file)
@@ -5,6 +5,7 @@
 #include "dispatch.h"
 #include "xerror.h"
 #include "prop.h"
+#include "startup.h"
 #include "screen.h"
 #include "focus.h"
 #include "moveresize.h"
 #ifdef HAVE_STDLIB_H
 #  include <stdlib.h>
 #endif
-#ifdef HAVE_SYS_WAIT_H
-#  include <sys/types.h>
-#  include <sys/wait.h>
-#endif
 #ifdef HAVE_LOCALE_H
 #  include <locale.h>
 #endif
@@ -94,10 +91,6 @@ int main(int argc, char **argv)
     sigaction(SIGTERM, &action, (struct sigaction *) NULL);
     sigaction(SIGINT, &action, (struct sigaction *) NULL);
     sigaction(SIGHUP, &action, (struct sigaction *) NULL);
-    sigaction(SIGCHLD, &action, (struct sigaction *) NULL);
-
-    /* anything that died while we were restarting won't give us a SIGCHLD */
-    while (waitpid(-1, NULL, WNOHANG) > 0);
 
     /* create the ~/.openbox dir */
     path = g_build_filename(g_get_home_dir(), ".openbox", NULL);
@@ -159,6 +152,9 @@ int main(int argc, char **argv)
     prop_startup(); /* get atoms values for the display */
     extensions_query_all(); /* find which extensions are present */
 
+    /* save stuff that we can use to restore state */
+    startup_save();
+
     if (screen_annex()) { /* it will be ours! */
         /* startup the parsing so everything can register sections of the rc */
         parse_startup();
@@ -170,7 +166,6 @@ int main(int argc, char **argv)
        font_startup();
         theme_startup();
        event_startup();
-        moveresize_startup();
         grab_startup();
         plugin_startup();
         /* load the plugins specified in the pluginrc */
@@ -191,6 +186,7 @@ int main(int argc, char **argv)
         menu_startup();
         frame_startup();
         stacking_startup();
+        moveresize_startup();
        focus_startup();
        screen_startup();
         group_startup();
@@ -214,6 +210,7 @@ int main(int argc, char **argv)
         group_shutdown();
        screen_shutdown();
        focus_shutdown();
+        moveresize_shutdown();
         stacking_shutdown();
         frame_shutdown();
         menu_shutdown();
@@ -264,10 +261,6 @@ void signal_handler(const ObEvent *e, void *data)
        ob_shutdown = ob_restart = TRUE;
        break;
 
-    case SIGCHLD:
-       wait(NULL);
-       break;
-
     case SIGHUP:
     case SIGINT:
     case SIGTERM:
This page took 0.022516 seconds and 4 git commands to generate.