diff options
author | markt <markt> | 2007-12-13 18:42:05 (GMT) |
---|---|---|
committer | markt <markt> | 2007-12-13 18:42:05 (GMT) |
commit | b001ea9f1feb32a878b95a0b78c3fb0240f6df68 (patch) | |
tree | b9440acc1d1b44302f21eefb1fbda30096a50499 /src/FbTk | |
parent | 8b7464046cea5e521ac46811591b0fce0c45aca1 (diff) | |
download | fluxbox-b001ea9f1feb32a878b95a0b78c3fb0240f6df68.zip fluxbox-b001ea9f1feb32a878b95a0b78c3fb0240f6df68.tar.bz2 |
close menus when they lose focus, instead of on [exec] commands
Diffstat (limited to 'src/FbTk')
-rw-r--r-- | src/FbTk/Menu.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc index 4c41161..88240f1 100644 --- a/src/FbTk/Menu.cc +++ b/src/FbTk/Menu.cc | |||
@@ -815,6 +815,8 @@ void Menu::handleEvent(XEvent &event) { | |||
815 | if (event.type == FocusOut) { | 815 | if (event.type == FocusOut) { |
816 | if (s_focused == this) | 816 | if (s_focused == this) |
817 | s_focused = 0; | 817 | s_focused = 0; |
818 | if (shown == this && !m_torn) | ||
819 | hide(); | ||
818 | // I don't know why, but I get a FocusIn event when closing the menu with | 820 | // I don't know why, but I get a FocusIn event when closing the menu with |
819 | // the mouse over it -- probably an xorg bug, but it's easy to address here | 821 | // the mouse over it -- probably an xorg bug, but it's easy to address here |
820 | } else if (event.type == FocusIn && m_visible) { | 822 | } else if (event.type == FocusIn && m_visible) { |