From 4e69bd65c03d0f8787d9d6731cd1a97da42270f8 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Tue, 2 Mar 2010 15:30:23 +0100 Subject: [PATCH] Move autostart after creating the IPC socket in start process (Thanks Sasha) This fixes ticket #179. --- src/mainx.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) 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 */ -- 2.39.5