grab server on initialization
That allows to not miss any window on startup. Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
9e426be091
commit
803d837d88
|
@ -384,6 +384,9 @@ main(int argc, char **argv)
|
||||||
if(xcb_connection_has_error(globalconf.connection))
|
if(xcb_connection_has_error(globalconf.connection))
|
||||||
fatal("cannot open display");
|
fatal("cannot open display");
|
||||||
|
|
||||||
|
/* Grab server */
|
||||||
|
xcb_grab_server(globalconf.connection);
|
||||||
|
|
||||||
/* Get the file descriptor corresponding to the X connection */
|
/* Get the file descriptor corresponding to the X connection */
|
||||||
xfd = xcb_get_file_descriptor(globalconf.connection);
|
xfd = xcb_get_file_descriptor(globalconf.connection);
|
||||||
ev_io_init(&xio, &a_xcb_io_cb, xfd, EV_READ);
|
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 */
|
/* refresh everything before waiting events */
|
||||||
awesome_refresh(globalconf.connection);
|
awesome_refresh(globalconf.connection);
|
||||||
|
|
||||||
|
/* Grab server */
|
||||||
|
xcb_ungrab_server(globalconf.connection);
|
||||||
|
|
||||||
/* main event loop */
|
/* main event loop */
|
||||||
ev_loop(globalconf.loop, 0);
|
ev_loop(globalconf.loop, 0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue