]> git.sur5r.net Git - i3/i3/commitdiff
Bugfix: use restore_conn, not conn 3547/head
authorMichael Stapelberg <michael@stapelberg.de>
Sat, 8 Dec 2018 12:31:53 +0000 (13:31 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Sat, 8 Dec 2018 12:31:53 +0000 (13:31 +0100)
Using the wrong X11 connection breaks the libev event handling model:
xcb_flush() must be called immediately before handing control to libev.

Before this fix:

1. xcb_prepare_cb would read and flush conn
2. restore_xcb_prepare_cb would read and flush restore_conn,
   BUT also inadvertantly call xcb_flush(conn), resulting in new
   events being filled into the XCB event queue
3. libev waits for new events
4. after 1 minute, libev times out and the events are processed

Diagnosed using strace on testcases/complete-run.pl.

related to commit 0d8b6714e39af81cbd6f4fbad500872a715dea24

related to #3510


No differences found