From 06824998958abc84da4960ff5c99898b7d3406c5 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Mon, 9 Aug 2010 13:30:46 +0200 Subject: [PATCH] Ignore all UnmapNotifies due to the root window We got XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY on the root window, but we also have XCB_EVENT_MASK_STRUCTURE_NOTIFY on the individual client windows. Since we are reparenting our windows, we can safely ignore all UnmapNotifies that we get through the root window. This fixes a bug if there were any windows already present before awesome started. Those were obviously already mapped which means that ReparentWindow would cause an UnmapNotify for them on the root window. This commit makes us ignore that UnmapNotify and thus not throwing away the window immediately again. Signed-off-by: Uli Schlachter --- event.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/event.c b/event.c index a1b48f5b..fb21794e 100644 --- a/event.c +++ b/event.c @@ -630,7 +630,10 @@ event_handle_unmapnotify(xcb_unmap_notify_event_t *ev) if((c = client_getbywin(ev->window))) { - client_unmanage(c); + /* We got XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY on the root window. + * Ignore any UnmapNotifies we get due to that. */ + if (ev->event == c->window) + client_unmanage(c); } else for(int i = 0; i < globalconf.embedded.len; i++)