Clear our event mask in client_unmanage()
This should fix an actual race condition: - Client unmaps its window (UnmapNotify for awesome) - Client maps its window (MapRequest for awesome) - Due to the UnmapNotify: client_unmanage() runs and reparents the window back to the root (ReparentNotify) - Due to the MapRequest: client_manage() runs - Due to the ReparentNotify: We call client_unmanage() again and now the client's window is lost. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
c36ee7fea8
commit
0eb9363533
|
@ -1043,6 +1043,13 @@ client_unmanage(client_t *c)
|
||||||
|
|
||||||
ewmh_update_net_client_list(c->phys_screen);
|
ewmh_update_net_client_list(c->phys_screen);
|
||||||
|
|
||||||
|
/* Clear our event mask so that we don't receive any events from now on,
|
||||||
|
* especially not for the following requests. */
|
||||||
|
xcb_change_window_attributes(globalconf.connection,
|
||||||
|
c->window,
|
||||||
|
XCB_CW_EVENT_MASK,
|
||||||
|
(const uint32_t []) { 0 });
|
||||||
|
|
||||||
xcb_screen_t *s = xutil_screen_get(globalconf.connection, c->phys_screen);
|
xcb_screen_t *s = xutil_screen_get(globalconf.connection, c->phys_screen);
|
||||||
xcb_unmap_window(globalconf.connection, c->window);
|
xcb_unmap_window(globalconf.connection, c->window);
|
||||||
xcb_reparent_window(globalconf.connection, c->window, s->root,
|
xcb_reparent_window(globalconf.connection, c->window, s->root,
|
||||||
|
|
Loading…
Reference in New Issue