aboutsummaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
authorJim Ramsay <i.am@jimramsay.com>2009-01-30 15:41:27 (GMT)
committerJim Ramsay <i.am@jimramsay.com>2009-02-27 20:18:07 (GMT)
commit5c7784affe78467d7ef4e52e22da83c341622d53 (patch)
treecbb83969ab422857bac498d51238789b0dfc6648 /src/Window.cc
parente7700166604d737ff23427877100c8888c761494 (diff)
downloadfluxbox-5c7784affe78467d7ef4e52e22da83c341622d53.zip
fluxbox-5c7784affe78467d7ef4e52e22da83c341622d53.tar.bz2
Added facility to selectively ignore EnterNotify events
This will be used to avoid some situations where an EnterNotify event should not focus the window beneath the mouse cursor. For example, when a menu (or any window for that matter) is unmapped, focus should not pass to whatever window is beneath the current location of the mouse cursor, but to the previous window in the focus list. This was first noticed when using the ClientMenu feature with focus-follows-mouse on -> The focus would always end up on the window beneath the mouse pointer, not the window selected in the menu.
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Window.cc b/src/Window.cc
index 4b4d1dc..513fbb6 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -2680,13 +2680,17 @@ void FluxboxWindow::enterNotifyEvent(XCrossingEvent &ev) {
2680 sa.enter = sa.leave = False; 2680 sa.enter = sa.leave = False;
2681 XCheckIfEvent(display, &dummy, queueScanner, (char *) &sa); 2681 XCheckIfEvent(display, &dummy, queueScanner, (char *) &sa);
2682 2682
2683 if ((!sa.leave || sa.inferior) && !screen().focusControl().isCycling() ) { 2683 if ((!sa.leave || sa.inferior) &&
2684 !screen().focusControl().isCycling() &&
2685 !screen().focusControl().isIgnored(ev.x_root, ev.y_root) ) {
2684 focus(); 2686 focus();
2685 } 2687 }
2686 } 2688 }
2687 } 2689 }
2688 2690
2689 if (screen().focusControl().isMouseTabFocus() && client && client != m_client) { 2691 if (screen().focusControl().isMouseTabFocus() &&
2692 client && client != m_client &&
2693 !screen().focusControl().isIgnored(ev.x_root, ev.y_root) ) {
2690 setCurrentClient(*client, isFocused()); 2694 setCurrentClient(*client, isFocused());
2691 } 2695 }
2692 2696