aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/FbTk/EventManager.cc4
-rw-r--r--src/Window.cc13
2 files changed, 12 insertions, 5 deletions
diff --git a/src/FbTk/EventManager.cc b/src/FbTk/EventManager.cc
index ae52908..b9d5e98 100644
--- a/src/FbTk/EventManager.cc
+++ b/src/FbTk/EventManager.cc
@@ -179,9 +179,7 @@ void EventManager::dispatch(Window win, XEvent &ev, bool parent) {
179 evhand->exposeEvent(ev.xexpose); 179 evhand->exposeEvent(ev.xexpose);
180 break; 180 break;
181 case EnterNotify: 181 case EnterNotify:
182 if (ev.xcrossing.mode != NotifyGrab && 182 evhand->enterNotifyEvent(ev.xcrossing);
183 ev.xcrossing.mode != NotifyUngrab)
184 evhand->enterNotifyEvent(ev.xcrossing);
185 break; 183 break;
186 case LeaveNotify: 184 case LeaveNotify:
187 if (ev.xcrossing.mode != NotifyGrab && 185 if (ev.xcrossing.mode != NotifyGrab &&
diff --git a/src/Window.cc b/src/Window.cc
index 3c32d0e..4e2aed1 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -2716,12 +2716,21 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me) {
2716 2716
2717void FluxboxWindow::enterNotifyEvent(XCrossingEvent &ev) { 2717void FluxboxWindow::enterNotifyEvent(XCrossingEvent &ev) {
2718 2718
2719 static FluxboxWindow *s_last_really_entered = 0;
2720
2721 if (ev.mode == NotifyUngrab && s_last_really_entered == this) {
2722 // if this results from an ungrab, only act if the window really changed.
2723 // otherwise we might pollute the focus which could have been assigned
2724 // by alt+tab (bug #597)
2725 return;
2726 }
2727
2719 // ignore grab activates, or if we're not visible 2728 // ignore grab activates, or if we're not visible
2720 if (ev.mode == NotifyGrab || ev.mode == NotifyUngrab || 2729 if (ev.mode == NotifyGrab || !isVisible()) {
2721 !isVisible()) {
2722 return; 2730 return;
2723 } 2731 }
2724 2732
2733 s_last_really_entered = this;
2725 if (ev.window == frame().window()) 2734 if (ev.window == frame().window())
2726 Fluxbox::instance()->keys()->doAction(ev.type, ev.state, 0, 2735 Fluxbox::instance()->keys()->doAction(ev.type, ev.state, 0,
2727 Keys::ON_WINDOW, m_client); 2736 Keys::ON_WINDOW, m_client);