Merge pull request #2863 from stapelberg/fixfreeze

i3bar: Bugfix: avoid freeze after VisibilityNotify
This commit is contained in:
Ingo Bürk 2017-08-20 12:25:06 +02:00 committed by GitHub
commit ad8bb41686
1 changed files with 6 additions and 0 deletions

View File

@ -1255,6 +1255,12 @@ char *init_xcb_early() {
ev_prepare_init(xcb_prep, &xcb_prep_cb); ev_prepare_init(xcb_prep, &xcb_prep_cb);
ev_check_init(xcb_chk, &xcb_chk_cb); ev_check_init(xcb_chk, &xcb_chk_cb);
/* Within an event loop iteration, run the xcb_chk watcher last: other
* watchers might call xcb_flush(), which, unexpectedly, can also read
* events into the queue (see _xcb_conn_wait). Hence, we need to drain xcbs
* queue last, otherwise we risk dead-locking. */
ev_set_priority(xcb_chk, EV_MINPRI);
ev_io_start(main_loop, xcb_io); ev_io_start(main_loop, xcb_io);
ev_prepare_start(main_loop, xcb_prep); ev_prepare_start(main_loop, xcb_prep);
ev_check_start(main_loop, xcb_chk); ev_check_start(main_loop, xcb_chk);