Handle synthetic UnmapNotify events *correctly*
Second try: Turns out I messed up with XCB_EVENT_SENT() and had a "!" too much. The old code already tried to cope with this, but forgot to actually unmap the window which it just set to withdrawn state. This time I tested the patch *again* and now I found even less bugs than on my last try. P.S.: I suck. Signed-off-by: Uli Schlachter <psychon@znc.in> Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
9038c5165d
commit
d09c3c02e8
6
event.c
6
event.c
|
@ -677,9 +677,11 @@ event_handle_unmapnotify(void *data __attribute__ ((unused)),
|
||||||
if((c = client_getbywin(ev->window)))
|
if((c = client_getbywin(ev->window)))
|
||||||
{
|
{
|
||||||
if(ev->event == xutil_screen_get(connection, c->phys_screen)->root
|
if(ev->event == xutil_screen_get(connection, c->phys_screen)->root
|
||||||
&& XCB_EVENT_SENT(ev)
|
&& XCB_EVENT_SENT(ev))
|
||||||
&& window_state_get_reply(window_state_get_unchecked(c->window)) == XCB_WM_STATE_NORMAL)
|
{
|
||||||
client_unmanage(c);
|
client_unmanage(c);
|
||||||
|
xcb_unmap_window(connection, ev->window);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
for(int i = 0; i < globalconf.embedded.len; i++)
|
for(int i = 0; i < globalconf.embedded.len; i++)
|
||||||
|
|
Loading…
Reference in New Issue