diff options
Diffstat (limited to 'src/FocusModelMenuItem.hh')
-rw-r--r-- | src/FocusModelMenuItem.hh | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/FocusModelMenuItem.hh b/src/FocusModelMenuItem.hh index fcf2243..91657e9 100644 --- a/src/FocusModelMenuItem.hh +++ b/src/FocusModelMenuItem.hh | |||
@@ -39,13 +39,15 @@ public: | |||
39 | FbTk::RefCount<FbTk::Command> &cmd): | 39 | FbTk::RefCount<FbTk::Command> &cmd): |
40 | FbTk::MenuItem(label, cmd), | 40 | FbTk::MenuItem(label, cmd), |
41 | m_focus_control(focus_control), | 41 | m_focus_control(focus_control), |
42 | m_focusmodel(model) { } | 42 | m_focusmodel(model) { |
43 | setCloseOnClick(false); | ||
44 | } | ||
43 | 45 | ||
44 | bool isEnabled() const { return m_focus_control.focusModel() != m_focusmodel; } | 46 | bool isEnabled() const { return m_focus_control.focusModel() != m_focusmodel; } |
45 | 47 | ||
46 | void click(int button, int time) { | 48 | void click(int button, int time, unsigned int mods) { |
47 | m_focus_control.setFocusModel(m_focusmodel); | 49 | m_focus_control.setFocusModel(m_focusmodel); |
48 | FbTk::MenuItem::click(button, time); | 50 | FbTk::MenuItem::click(button, time, mods); |
49 | } | 51 | } |
50 | 52 | ||
51 | private: | 53 | private: |
@@ -61,13 +63,15 @@ public: | |||
61 | FbTk::RefCount<FbTk::Command> &cmd): | 63 | FbTk::RefCount<FbTk::Command> &cmd): |
62 | FbTk::MenuItem(label, cmd), | 64 | FbTk::MenuItem(label, cmd), |
63 | m_focus_control(focus_control), | 65 | m_focus_control(focus_control), |
64 | m_tabfocusmodel(model) { } | 66 | m_tabfocusmodel(model) { |
67 | setCloseOnClick(false); | ||
68 | } | ||
65 | 69 | ||
66 | bool isEnabled() const { return m_focus_control.tabFocusModel() != m_tabfocusmodel; } | 70 | bool isEnabled() const { return m_focus_control.tabFocusModel() != m_tabfocusmodel; } |
67 | 71 | ||
68 | void click(int button, int time) { | 72 | void click(int button, int time, unsigned int mods) { |
69 | m_focus_control.setTabFocusModel(m_tabfocusmodel); | 73 | m_focus_control.setTabFocusModel(m_tabfocusmodel); |
70 | FbTk::MenuItem::click(button, time); | 74 | FbTk::MenuItem::click(button, time, mods); |
71 | } | 75 | } |
72 | 76 | ||
73 | private: | 77 | private: |