diff options
author | Mark Tiefenbruck <mark@fluxbox.org> | 2007-12-18 05:44:17 (GMT) |
---|---|---|
committer | Mark Tiefenbruck <mark@fluxbox.org> | 2007-12-18 05:44:17 (GMT) |
commit | c01bd6e9fd98dd0f70ffc1d01df86e73719cd5e0 (patch) | |
tree | 7e25c017727402a33fd8e4c851b5bab9e6add568 /src/FbTk/MenuItem.cc | |
parent | 31df2d8bd618cae590d9b0e76aee11021d4c77d3 (diff) | |
download | fluxbox-c01bd6e9fd98dd0f70ffc1d01df86e73719cd5e0.zip fluxbox-c01bd6e9fd98dd0f70ffc1d01df86e73719cd5e0.tar.bz2 |
holding control will now keep the menu open
Diffstat (limited to 'src/FbTk/MenuItem.cc')
-rw-r--r-- | src/FbTk/MenuItem.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/FbTk/MenuItem.cc b/src/FbTk/MenuItem.cc index 7d309f4..1e708d3 100644 --- a/src/FbTk/MenuItem.cc +++ b/src/FbTk/MenuItem.cc | |||
@@ -30,12 +30,13 @@ | |||
30 | #include "App.hh" | 30 | #include "App.hh" |
31 | #include "StringUtil.hh" | 31 | #include "StringUtil.hh" |
32 | #include "Menu.hh" | 32 | #include "Menu.hh" |
33 | #include <X11/keysym.h> | ||
33 | 34 | ||
34 | namespace FbTk { | 35 | namespace FbTk { |
35 | 36 | ||
36 | void MenuItem::click(int button, int time) { | 37 | void MenuItem::click(int button, int time, unsigned int mods) { |
37 | if (m_command.get() != 0) { | 38 | if (m_command.get() != 0) { |
38 | if (m_menu && m_close_on_click) | 39 | if (m_menu && m_close_on_click && (mods & ControlMask) == 0) |
39 | m_menu->hide(); | 40 | m_menu->hide(); |
40 | // we need a local variable, since the command may destroy this object | 41 | // we need a local variable, since the command may destroy this object |
41 | RefCount<Command> tmp(m_command); | 42 | RefCount<Command> tmp(m_command); |