From 2534f219400718ef20d60fb31dbb2c03ec3fbb27 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Fri, 16 Apr 2010 20:56:49 +0200 Subject: [PATCH] ignore sequence of unmapnotify events (generates enternotify events) --- src/handlers.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/handlers.c b/src/handlers.c index 4d3e88b9..510148d0 100644 --- a/src/handlers.c +++ b/src/handlers.c @@ -450,9 +450,11 @@ int handle_screen_change(void *prophs, xcb_connection_t *conn, */ int handle_unmap_notify_event(void *data, xcb_connection_t *conn, xcb_unmap_notify_event_t *event) { - //add_ignore_event(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)\n", event->window, event->event); + DLOG("UnmapNotify for 0x%08x (received from 0x%08x), serial %d\n", event->window, event->event, event->sequence); Con *con = con_by_window_id(event->window); if (con == NULL) { LOG("Not a managed window, ignoring\n"); -- 2.39.5