aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/MenuItem.cc
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2007-12-18 05:09:20 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2007-12-18 05:09:20 (GMT)
commit31df2d8bd618cae590d9b0e76aee11021d4c77d3 (patch)
tree3be26fb88b0e0178a728bd9968eea2e93f62b6f6 /src/FbTk/MenuItem.cc
parentc39af52bfca7f6962048a102597d88337c949b67 (diff)
downloadfluxbox_paul-31df2d8bd618cae590d9b0e76aee11021d4c77d3.zip
fluxbox_paul-31df2d8bd618cae590d9b0e76aee11021d4c77d3.tar.bz2
make MenuItem responsible for decision to close menu when clicked
Diffstat (limited to 'src/FbTk/MenuItem.cc')
-rw-r--r--src/FbTk/MenuItem.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/FbTk/MenuItem.cc b/src/FbTk/MenuItem.cc
index 2576d2b..7d309f4 100644
--- a/src/FbTk/MenuItem.cc
+++ b/src/FbTk/MenuItem.cc
@@ -35,6 +35,8 @@ namespace FbTk {
35 35
36void MenuItem::click(int button, int time) { 36void MenuItem::click(int button, int time) {
37 if (m_command.get() != 0) { 37 if (m_command.get() != 0) {
38 if (m_menu && m_close_on_click)
39 m_menu->hide();
38 // we need a local variable, since the command may destroy this object 40 // we need a local variable, since the command may destroy this object
39 RefCount<Command> tmp(m_command); 41 RefCount<Command> tmp(m_command);
40 tmp->execute(); 42 tmp->execute();