diff --git a/awesome.c b/awesome.c index 9cd30308..2325ae91 100644 --- a/awesome.c +++ b/awesome.c @@ -386,6 +386,7 @@ main(int argc, char **argv) /* Grab server */ xcb_grab_server(globalconf.connection); + xcb_flush(globalconf.connection); /* Get the file descriptor corresponding to the X connection */ xfd = xcb_get_file_descriptor(globalconf.connection); @@ -504,6 +505,9 @@ main(int argc, char **argv) systray_init(screen_nbr); } + /* Grab server */ + xcb_ungrab_server(globalconf.connection); + xcb_aux_sync(globalconf.connection); luaA_cs_init(); @@ -512,9 +516,6 @@ main(int argc, char **argv) /* refresh everything before waiting events */ awesome_refresh(globalconf.connection); - /* Grab server */ - xcb_ungrab_server(globalconf.connection); - /* main event loop */ ev_loop(globalconf.loop, 0);