]> git.sur5r.net Git - i3/i3/commitdiff
Move autostart after creating the IPC socket in start process (Thanks Sasha)
authorMichael Stapelberg <michael@stapelberg.de>
Tue, 2 Mar 2010 14:30:23 +0000 (15:30 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Tue, 2 Mar 2010 14:30:23 +0000 (15:30 +0100)
This fixes ticket #179.

src/mainx.c

index 8130c0744b2272cbbeaea0ae2eea9c51d0c46e82..00ecd43251ab724e6b595609530de351bcd82107 100644 (file)
@@ -460,15 +460,6 @@ int main(int argc, char *argv[], char *env[]) {
 
         grab_all_keys(conn);
 
-        /* Autostarting exec-lines */
-        struct Autostart *exec;
-        if (autostart) {
-                TAILQ_FOREACH(exec, &autostarts, autostarts) {
-                        LOG("auto-starting %s\n", exec->command);
-                        start_application(exec->command);
-                }
-        }
-
         DLOG("Checking for XRandR...\n");
         int randr_base;
         initialize_randr(conn, &randr_base);
@@ -517,6 +508,16 @@ int main(int argc, char *argv[], char *env[]) {
         setup_signal_handler();
         /* Ungrab the server to receive events and enter libev’s eventloop */
         xcb_ungrab_server(conn);
+
+        /* Autostarting exec-lines */
+        struct Autostart *exec;
+        if (autostart) {
+                TAILQ_FOREACH(exec, &autostarts, autostarts) {
+                        LOG("auto-starting %s\n", exec->command);
+                        start_application(exec->command);
+                }
+        }
+
         ev_loop(loop, 0);
 
         /* not reached */