Unmanage clients on UnmapNotifies

ICCCM mandates that window managers have to trigger the conversion to withdrawn
state on the synthetic and the real unmap notify, no matter if any is missing.
Previously we couldn't do this, but thanks to the reparenting, we can now do
this properly.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2010-08-01 15:46:18 +02:00
parent 9fbdecf26c
commit eb89467896
1 changed files with 2 additions and 6 deletions

View File

@ -628,14 +628,10 @@ event_handle_unmapnotify(xcb_unmap_notify_event_t *ev)
client_t *c; client_t *c;
if((c = client_getbywin(ev->window))) if((c = client_getbywin(ev->window)))
{
if(ev->event == xutil_screen_get(globalconf.connection, c->phys_screen)->root
&& XCB_EVENT_SENT(ev))
{ {
client_unmanage(c); client_unmanage(c);
xcb_unmap_window(globalconf.connection, ev->window); xcb_unmap_window(globalconf.connection, ev->window);
} }
}
else else
for(int i = 0; i < globalconf.embedded.len; i++) for(int i = 0; i < globalconf.embedded.len; i++)
if(globalconf.embedded.tab[i].win == ev->window) if(globalconf.embedded.tab[i].win == ev->window)