From 037654f3f89dcf07aba1b49b9f03a8187adeaa73 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sun, 22 Apr 2007 16:48:35 +0000 Subject: [PATCH] use ignore enters instead of removing them from the queue --- openbox/client.c | 8 +++----- openbox/popup.c | 5 +---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/openbox/client.c b/openbox/client.c index 86acafb1..a65e7400 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -512,11 +512,9 @@ void client_unmanage(ObClient *self) XSync(ob_display, FALSE); if (focus_client == self) { - XEvent e; - - /* focus the last focused window on the desktop, and ignore enter - events from the unmap so it doesnt mess with the focus */ - while (XCheckTypedEvent(ob_display, EnterNotify, &e)); + /* ignore enter events from the unmap so it doesnt mess with the focus + */ + event_ignore_queued_enters(); } diff --git a/openbox/popup.c b/openbox/popup.c index ee44ed23..031b1d49 100644 --- a/openbox/popup.c +++ b/openbox/popup.c @@ -213,14 +213,11 @@ void popup_show(ObPopup *self, gchar *text) void popup_hide(ObPopup *self) { if (self->mapped) { - XEvent e; - XUnmapWindow(ob_display, self->bg); self->mapped = FALSE; /* kill enter events cause by this unmapping */ - XSync(ob_display, FALSE); - while (XCheckTypedEvent(ob_display, EnterNotify, &e)); + event_ignore_queued_enters(); } } -- 2.39.2