From: Michael Stapelberg Date: Tue, 2 Mar 2010 14:30:23 +0000 (+0100) Subject: Move autostart after creating the IPC socket in start process (Thanks Sasha) X-Git-Tag: 3.e~6^2~132 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4e69bd65c03d0f8787d9d6731cd1a97da42270f8;p=i3%2Fi3 Move autostart after creating the IPC socket in start process (Thanks Sasha) This fixes ticket #179. --- diff --git a/src/mainx.c b/src/mainx.c index 8130c074..00ecd432 100644 --- a/src/mainx.c +++ b/src/mainx.c @@ -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 */