*/
int handle_unmap_notify_event(void *data, xcb_connection_t *conn, xcb_unmap_notify_event_t *event) {
+ bool ignored = event_is_ignored(event->sequence);
+
/* we need to ignore EnterNotify events which will be generated because a
* different window is visible now */
add_ignore_event(event->sequence);
DLOG("UnmapNotify for 0x%08x (received from 0x%08x), serial %d\n", event->window, event->event, event->sequence);
+ if (ignored) {
+ DLOG("Ignoring UnmapNotify (generated by reparenting)\n");
+ return 1;
+ }
Con *con = con_by_window_id(event->window);
if (con == NULL) {
LOG("Not a managed window, ignoring\n");
goto out;
}
+ LOG("ignoring sequence %d for reparenting!\n", rcookie.sequence);
+ add_ignore_event(rcookie.sequence);
+
xcb_get_property_reply_t *reply = xcb_get_property_reply(conn, state_cookie, NULL);
if (xcb_reply_contains_atom(reply, atoms[_NET_WM_STATE_FULLSCREEN]))
con_toggle_fullscreen(nc);