diff options
author | markt <markt> | 2007-03-07 02:09:24 (GMT) |
---|---|---|
committer | markt <markt> | 2007-03-07 02:09:24 (GMT) |
commit | 4ed76f99b61a65356c63d13c526e8e04642ea053 (patch) | |
tree | f9bddaf9feeeb6d08c00474fdc576e371a589eb0 /src | |
parent | 82f02f44c590e6eb04b2b6211bc602cd75210524 (diff) | |
download | fluxbox_pavel-4ed76f99b61a65356c63d13c526e8e04642ea053.zip fluxbox_pavel-4ed76f99b61a65356c63d13c526e8e04642ea053.tar.bz2 |
don't mark menu as focused, even if it gets a FocusIn, when it's not visible
Diffstat (limited to 'src')
-rw-r--r-- | src/FbTk/Menu.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc index 163fc83..a2326c4 100644 --- a/src/FbTk/Menu.cc +++ b/src/FbTk/Menu.cc | |||
@@ -816,7 +816,9 @@ void Menu::handleEvent(XEvent &event) { | |||
816 | if (event.type == FocusOut) { | 816 | if (event.type == FocusOut) { |
817 | if (s_focused == this) | 817 | if (s_focused == this) |
818 | s_focused = 0; | 818 | s_focused = 0; |
819 | } else if (event.type == FocusIn) { | 819 | // I don't know why, but I get a FocusIn event when closing the menu with |
820 | // the mouse over it -- probably an xorg bug, but it's easy to address here | ||
821 | } else if (event.type == FocusIn && m_visible) { | ||
820 | if (s_focused != this) | 822 | if (s_focused != this) |
821 | s_focused = this; | 823 | s_focused = this; |
822 | // if there's a submenu open, focus it instead | 824 | // if there's a submenu open, focus it instead |