SLIST_INSERT_HEAD(&ignore_events, event, ignore_events);
}
+/*
+ * Unignores the given sequence. Called when unmap events (generated by
+ * reparenting) should be ignored and the unmap event actually happens, in
+ * order to not ignore too many unmap events (leading to ghost window
+ * decorations).
+ *
+ */
+static void unignore_event(const int sequence) {
+ struct Ignore_Event *event;
+ for (event = SLIST_FIRST(&ignore_events);
+ event != SLIST_END(&ignore_events);
+ event = SLIST_NEXT(event, ignore_events)) {
+ if (event->sequence != sequence)
+ continue;
+
+ DLOG("Unignoring sequence number %d\n", sequence);
+ struct Ignore_Event *save = event;
+ event = SLIST_NEXT(event, ignore_events);
+ SLIST_REMOVE(&ignore_events, save, Ignore_Event, ignore_events);
+ free(save);
+ break;
+ }
+}
+
/*
* Checks if the given sequence is ignored and returns true if so.
*
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");
+ unignore_event(event->sequence);
return 1;
}
Con *con = con_by_window_id(event->window);