]> Dogcows Code - chaz/openbox/blobdiff - openbox/openbox.c
add RECT_CONTAINS
[chaz/openbox] / openbox / openbox.c
index 4556fc8fcc677d94e40fb2274a632ad774750920..017eb184115bdd3231634269fcdd34380811f8c5 100644 (file)
@@ -35,6 +35,9 @@
 #ifdef HAVE_LOCALE_H
 #  include <locale.h>
 #endif
+#ifdef HAVE_UNISTD_H
+#  include <unistd.h>
+#endif
 
 #include <X11/cursorfont.h>
 
@@ -172,7 +175,27 @@ int main(int argc, char **argv)
 
     XCloseDisplay(ob_display);
 
-    /* XXX if (ob_restart) */
+    if (ob_restart) {
+        ob_restart_path = "";
+        if (ob_restart_path != NULL) {
+            int argcp;
+            char **argvp;
+            GError *err = NULL;
+
+            /* run other shit */
+            if (g_shell_parse_argv(ob_restart_path, &argcp, &argvp, &err)) {
+                execvp(argvp[0], argvp);
+                g_strfreev(argvp);
+            } else {
+                g_warning("failed to execute '%s': %s", ob_restart_path,
+                          err->message);
+            }
+        }
+
+        /* re-run me */
+        execvp(argv[0], argv); /* try how we were run */
+        execlp("ob3", "ob3", NULL); /* try this as a last resort */
+    }
      
     return 0;
 }
This page took 0.022758 seconds and 4 git commands to generate.