From 76ea1d9bbe3f3b7edb15da1a67652982edd5f646 Mon Sep 17 00:00:00 2001 From: Jim Ramsay Date: Fri, 30 Jan 2009 10:47:24 -0500 Subject: Ignore EnterNotify on Unmap This is the basic condition that was first noticed because of the effect of the ClientMenu window unmapping and the resulting EnterNotify event stealing focus from the window selected in that menu. But to be complete, any window unmapping should cause focus to move to the next in the last-recently-focused window list, not the one that happens to be beneath the mouse cursor. --- src/fluxbox.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 93768da..f44f8aa 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc @@ -899,6 +899,11 @@ void Fluxbox::handleUnmapNotify(XUnmapEvent &ue) { BScreen *screen = searchScreen(ue.event); + if (screen) { + /* Ignore all EnterNotify events until the pointer actually moves */ + screen->focusControl().ignoreAtPointer(); + } + if (ue.event != ue.window && (!screen || !ue.send_event)) { return; } -- cgit v0.11.2