From 803d837d88345c90c6c90ab0762e4512de560030 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 10 Sep 2008 16:06:32 +0200 Subject: [PATCH] grab server on initialization That allows to not miss any window on startup. Signed-off-by: Julien Danjou --- awesome.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/awesome.c b/awesome.c index 16797dc51..9cd303082 100644 --- a/awesome.c +++ b/awesome.c @@ -384,6 +384,9 @@ main(int argc, char **argv) if(xcb_connection_has_error(globalconf.connection)) fatal("cannot open display"); + /* Grab server */ + xcb_grab_server(globalconf.connection); + /* Get the file descriptor corresponding to the X connection */ xfd = xcb_get_file_descriptor(globalconf.connection); ev_io_init(&xio, &a_xcb_io_cb, xfd, EV_READ); @@ -509,6 +512,9 @@ 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);