aboutsummaryrefslogtreecommitdiff
path: root/src/FocusControl.hh
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/FocusControl.hh
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/FocusControl.hh')
-rw-r--r--src/FocusControl.hh10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/FocusControl.hh b/src/FocusControl.hh
index 4de4310..91681ab 100644
--- a/src/FocusControl.hh
+++ b/src/FocusControl.hh
@@ -93,6 +93,15 @@ public:
93 bool isMouseFocus() const { return focusModel() == MOUSEFOCUS; } 93 bool isMouseFocus() const { return focusModel() == MOUSEFOCUS; }
94 /// @return true if tab focus mode is mouse tab focus 94 /// @return true if tab focus mode is mouse tab focus
95 bool isMouseTabFocus() const { return tabFocusModel() == MOUSETABFOCUS; } 95 bool isMouseTabFocus() const { return tabFocusModel() == MOUSETABFOCUS; }
96
97 /// Set the "ignore" pointer location to the current pointer location
98 void ignoreAtPointer();
99 /// Set the "ignore" pointer location to the given coordinates
100 void ignoreAt(int x, int y);
101 /// @return true if events at the given X/Y coordinate should be ignored
102 /// (ie, they were previously cached via one of the ignoreAt calls)
103 bool isIgnored(int x, int y);
104
96 /// @return true if cycling is in progress 105 /// @return true if cycling is in progress
97 bool isCycling() const { return m_cycling_list != 0; } 106 bool isCycling() const { return m_cycling_list != 0; }
98 /// Appends a client to the front of the focus list 107 /// Appends a client to the front of the focus list
@@ -157,6 +166,7 @@ private:
157 const FocusableList *m_cycling_list; 166 const FocusableList *m_cycling_list;
158 Focusable *m_was_iconic; 167 Focusable *m_was_iconic;
159 WinClient *m_cycling_last; 168 WinClient *m_cycling_last;
169 int m_ignore_mouse_x, m_ignore_mouse_y;
160 170
161 static WinClient *s_focused_window; 171 static WinClient *s_focused_window;
162 static FluxboxWindow *s_focused_fbwindow; 172 static FluxboxWindow *s_focused_fbwindow;