aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2007-12-18 05:44:17 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2007-12-18 05:44:17 (GMT)
commitc01bd6e9fd98dd0f70ffc1d01df86e73719cd5e0 (patch)
tree7e25c017727402a33fd8e4c851b5bab9e6add568 /src
parent31df2d8bd618cae590d9b0e76aee11021d4c77d3 (diff)
downloadfluxbox_pavel-c01bd6e9fd98dd0f70ffc1d01df86e73719cd5e0.zip
fluxbox_pavel-c01bd6e9fd98dd0f70ffc1d01df86e73719cd5e0.tar.bz2
holding control will now keep the menu open
Diffstat (limited to 'src')
-rw-r--r--src/AlphaMenu.hh5
-rw-r--r--src/BoolMenuItem.hh5
-rw-r--r--src/ClientMenu.cc6
-rw-r--r--src/ClockTool.cc5
-rw-r--r--src/FbTk/Menu.cc4
-rw-r--r--src/FbTk/MenuItem.cc5
-rw-r--r--src/FbTk/MenuItem.hh2
-rw-r--r--src/FbTk/MultiButtonMenuItem.cc2
-rw-r--r--src/FbTk/MultiButtonMenuItem.hh2
-rw-r--r--src/FocusModelMenuItem.hh16
-rw-r--r--src/IconbarTool.cc10
-rw-r--r--src/IntResMenuItem.hh4
-rw-r--r--src/LayerMenu.hh4
-rw-r--r--src/Remember.cc5
-rw-r--r--src/Screen.cc8
-rw-r--r--src/Slit.cc16
-rw-r--r--src/Xinerama.hh4
17 files changed, 61 insertions, 42 deletions
diff --git a/src/AlphaMenu.hh b/src/AlphaMenu.hh
index 78dda9a..6323fe1 100644
--- a/src/AlphaMenu.hh
+++ b/src/AlphaMenu.hh
@@ -64,17 +64,18 @@ public:
64 AlphaMenuSelectItem(const FbTk::FbString &label, AlphaObject *object, AlphaMenu &parent): 64 AlphaMenuSelectItem(const FbTk::FbString &label, AlphaObject *object, AlphaMenu &parent):
65 FbTk::MenuItem(label), m_object(object), m_parent(parent) { 65 FbTk::MenuItem(label), m_object(object), m_parent(parent) {
66 setToggleItem(true); 66 setToggleItem(true);
67 setCloseOnClick(false);
67 } 68 }
68 69
69 bool isSelected() const { return m_object->getUseDefaultAlpha(); } 70 bool isSelected() const { return m_object->getUseDefaultAlpha(); }
70 void click(int button, int time) { 71 void click(int button, int time, unsigned int mods) {
71 bool newval = !m_object->getUseDefaultAlpha(); 72 bool newval = !m_object->getUseDefaultAlpha();
72 m_object->setUseDefaultAlpha(newval); 73 m_object->setUseDefaultAlpha(newval);
73 // items 1 and 2 (the focused/unfocused values) are only enabled if we don't use default values 74 // items 1 and 2 (the focused/unfocused values) are only enabled if we don't use default values
74 m_parent.setItemEnabled(1, !newval); 75 m_parent.setItemEnabled(1, !newval);
75 m_parent.setItemEnabled(2, !newval); 76 m_parent.setItemEnabled(2, !newval);
76 m_parent.show(); // cheat to refreshing the window 77 m_parent.show(); // cheat to refreshing the window
77 FbTk::MenuItem::click(button, time); 78 FbTk::MenuItem::click(button, time, mods);
78 } 79 }
79 80
80 void updateLabel() { 81 void updateLabel() {
diff --git a/src/BoolMenuItem.hh b/src/BoolMenuItem.hh
index d10a7ac..c7e3d6c 100644
--- a/src/BoolMenuItem.hh
+++ b/src/BoolMenuItem.hh
@@ -44,7 +44,10 @@ public:
44 } 44 }
45 bool isSelected() const { return m_item; } 45 bool isSelected() const { return m_item; }
46 // toggle state 46 // toggle state
47 void click(int button, int time) { setSelected(!m_item); FbTk::MenuItem::click(button, time); } 47 void click(int button, int time, unsigned int mods) {
48 setSelected(!m_item);
49 FbTk::MenuItem::click(button, time, mods);
50 }
48 void setSelected(bool value) { 51 void setSelected(bool value) {
49 m_item = value; 52 m_item = value;
50 FbTk::MenuItem::setSelected(m_item); 53 FbTk::MenuItem::setSelected(m_item);
diff --git a/src/ClientMenu.cc b/src/ClientMenu.cc
index ae35aab..7248883 100644
--- a/src/ClientMenu.cc
+++ b/src/ClientMenu.cc
@@ -27,6 +27,7 @@
27#include "Screen.hh" 27#include "Screen.hh"
28#include "Window.hh" 28#include "Window.hh"
29#include "WindowCmd.hh" 29#include "WindowCmd.hh"
30#include <X11/keysym.h>
30 31
31#include "FbTk/MenuItem.hh" 32#include "FbTk/MenuItem.hh"
32 33
@@ -42,7 +43,7 @@ public:
42 } 43 }
43 ~ClientMenuItem() { m_client.titleSig().detach(menu()); } 44 ~ClientMenuItem() { m_client.titleSig().detach(menu()); }
44 45
45 void click(int button, int time) { 46 void click(int button, int time, unsigned int mods) {
46 FluxboxWindow *fbwin = m_client.fbwindow(); 47 FluxboxWindow *fbwin = m_client.fbwindow();
47 if (fbwin == 0) 48 if (fbwin == 0)
48 return; 49 return;
@@ -53,7 +54,8 @@ public:
53 54
54 m_client.focus(); 55 m_client.focus();
55 fbwin->raise(); 56 fbwin->raise();
56 parent->hide(); 57 if ((mods & ControlMask) == 0)
58 parent->hide();
57 } 59 }
58 60
59 const std::string &label() const { return m_client.title(); } 61 const std::string &label() const { return m_client.title(); }
diff --git a/src/ClockTool.cc b/src/ClockTool.cc
index b396999..0f4695b 100644
--- a/src/ClockTool.cc
+++ b/src/ClockTool.cc
@@ -61,9 +61,10 @@ public:
61 setLabel( _FB_XTEXT(Toolbar, Clock24, "Clock: 24h", "set Clockmode to 24h") ); 61 setLabel( _FB_XTEXT(Toolbar, Clock24, "Clock: 24h", "set Clockmode to 24h") );
62 else 62 else
63 setLabel( _FB_XTEXT(Toolbar, Clock12, "Clock: 12h", "set Clockmode to 12h") ); 63 setLabel( _FB_XTEXT(Toolbar, Clock12, "Clock: 12h", "set Clockmode to 12h") );
64 setCloseOnClick(false);
64 } 65 }
65 66
66 void click(int button, int time) { 67 void click(int button, int time, unsigned int mods) {
67 std::string newformat = m_tool.timeFormat(); 68 std::string newformat = m_tool.timeFormat();
68 size_t pos = newformat.find("%k"); 69 size_t pos = newformat.find("%k");
69 std::string newstr; 70 std::string newstr;
@@ -112,7 +113,7 @@ public:
112 setLabel( _FB_XTEXT(Toolbar, Clock12, "Clock: 12h", "set Clockmode to 12h") ); 113 setLabel( _FB_XTEXT(Toolbar, Clock12, "Clock: 12h", "set Clockmode to 12h") );
113 114
114 } // else some other strange format...so we don't do anything 115 } // else some other strange format...so we don't do anything
115 FbTk::MenuItem::click(button, time); 116 FbTk::MenuItem::click(button, time, mods);
116 } 117 }
117private: 118private:
118 ClockTool &m_tool; 119 ClockTool &m_tool;
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc
index 3be0d14..bb51d92 100644
--- a/src/FbTk/Menu.cc
+++ b/src/FbTk/Menu.cc
@@ -888,7 +888,7 @@ void Menu::buttonReleaseEvent(XButtonEvent &re) {
888 if (m_active_index == w && isItemEnabled(w) && 888 if (m_active_index == w && isItemEnabled(w) &&
889 re.x > ix && re.x < (signed) (ix + menu.item_w) && 889 re.x > ix && re.x < (signed) (ix + menu.item_w) &&
890 re.y > iy && re.y < (signed) (iy + theme().itemHeight())) { 890 re.y > iy && re.y < (signed) (iy + theme().itemHeight())) {
891 menuitems[w]->click(re.button, re.time); 891 menuitems[w]->click(re.button, re.time, re.state);
892 } else { 892 } else {
893 int old = m_active_index; 893 int old = m_active_index;
894 m_active_index = w; 894 m_active_index = w;
@@ -1054,7 +1054,7 @@ void Menu::keyPressEvent(XKeyEvent &event) {
1054 else { 1054 else {
1055 // send fake button click 1055 // send fake button click
1056 int button = (event.state & ShiftMask) ? 3 : 1; 1056 int button = (event.state & ShiftMask) ? 3 : 1;
1057 find(m_active_index)->click(button, event.time); 1057 find(m_active_index)->click(button, event.time, event.state);
1058 m_need_update = true; 1058 m_need_update = true;
1059 updateMenu(); 1059 updateMenu();
1060 } 1060 }
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
34namespace FbTk { 35namespace FbTk {
35 36
36void MenuItem::click(int button, int time) { 37void 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);
diff --git a/src/FbTk/MenuItem.hh b/src/FbTk/MenuItem.hh
index 3b02f2e..b6777b7 100644
--- a/src/FbTk/MenuItem.hh
+++ b/src/FbTk/MenuItem.hh
@@ -138,7 +138,7 @@ public:
138 @param button the button number 138 @param button the button number
139 @param time the time stamp 139 @param time the time stamp
140 */ 140 */
141 virtual void click(int button, int time); 141 virtual void click(int button, int time, unsigned int mods);
142 /// must use this to show submenu to ensure consistency for object like window menu in ClientMenu (see Workspace.cc) 142 /// must use this to show submenu to ensure consistency for object like window menu in ClientMenu (see Workspace.cc)
143 virtual void showSubmenu(); 143 virtual void showSubmenu();
144 RefCount<Command> &command() { return m_command; } 144 RefCount<Command> &command() { return m_command; }
diff --git a/src/FbTk/MultiButtonMenuItem.cc b/src/FbTk/MultiButtonMenuItem.cc
index b3fa1aa..591c13d 100644
--- a/src/FbTk/MultiButtonMenuItem.cc
+++ b/src/FbTk/MultiButtonMenuItem.cc
@@ -52,7 +52,7 @@ void MultiButtonMenuItem::setCommand(int button, FbTk::RefCount<FbTk::Command> &
52 m_button_exe[button - 1] = cmd; 52 m_button_exe[button - 1] = cmd;
53} 53}
54 54
55void MultiButtonMenuItem::click(int button, int time) { 55void MultiButtonMenuItem::click(int button, int time, unsigned int mods) {
56 if (button <= 0 || button > static_cast<signed>(buttons()) || buttons() == 0) 56 if (button <= 0 || button > static_cast<signed>(buttons()) || buttons() == 0)
57 return; 57 return;
58 58
diff --git a/src/FbTk/MultiButtonMenuItem.hh b/src/FbTk/MultiButtonMenuItem.hh
index 3e82d67..4bc1276 100644
--- a/src/FbTk/MultiButtonMenuItem.hh
+++ b/src/FbTk/MultiButtonMenuItem.hh
@@ -38,7 +38,7 @@ public:
38 /// sets command to specified button 38 /// sets command to specified button
39 void setCommand(int button, FbTk::RefCount<FbTk::Command> &cmd); 39 void setCommand(int button, FbTk::RefCount<FbTk::Command> &cmd);
40 /// executes command for the button click 40 /// executes command for the button click
41 virtual void click(int button, int time); 41 virtual void click(int button, int time, unsigned int mods);
42 /// @return number of buttons this instance handles 42 /// @return number of buttons this instance handles
43 inline unsigned int buttons() const { return m_buttons; } 43 inline unsigned int buttons() const { return m_buttons; }
44 44
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
51private: 53private:
@@ -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
73private: 77private:
diff --git a/src/IconbarTool.cc b/src/IconbarTool.cc
index 1e575dc..99907c7 100644
--- a/src/IconbarTool.cc
+++ b/src/IconbarTool.cc
@@ -108,11 +108,12 @@ public:
108 string mode, 108 string mode,
109 FbTk::RefCount<FbTk::Command> &cmd): 109 FbTk::RefCount<FbTk::Command> &cmd):
110 FbTk::MenuItem(label, cmd), m_handler(handler), m_mode(mode) { 110 FbTk::MenuItem(label, cmd), m_handler(handler), m_mode(mode) {
111 setCloseOnClick(false);
111 } 112 }
112 bool isEnabled() const { return m_handler.mode() != m_mode; } 113 bool isEnabled() const { return m_handler.mode() != m_mode; }
113 void click(int button, int time) { 114 void click(int button, int time, unsigned int mods) {
114 m_handler.setMode(m_mode); 115 m_handler.setMode(m_mode);
115 FbTk::MenuItem::click(button, time); 116 FbTk::MenuItem::click(button, time, mods);
116 } 117 }
117 118
118private: 119private:
@@ -126,11 +127,12 @@ public:
126 Container::Alignment mode, 127 Container::Alignment mode,
127 FbTk::RefCount<FbTk::Command> &cmd): 128 FbTk::RefCount<FbTk::Command> &cmd):
128 FbTk::MenuItem(label, cmd), m_handler(handler), m_mode(mode) { 129 FbTk::MenuItem(label, cmd), m_handler(handler), m_mode(mode) {
130 setCloseOnClick(false);
129 } 131 }
130 bool isEnabled() const { return m_handler.alignment() != m_mode; } 132 bool isEnabled() const { return m_handler.alignment() != m_mode; }
131 void click(int button, int time) { 133 void click(int button, int time, unsigned int mods) {
132 m_handler.setAlignment(m_mode); 134 m_handler.setAlignment(m_mode);
133 FbTk::MenuItem::click(button, time); 135 FbTk::MenuItem::click(button, time, mods);
134 } 136 }
135 137
136private: 138private:
diff --git a/src/IntResMenuItem.hh b/src/IntResMenuItem.hh
index e49681f..3de4b5f 100644
--- a/src/IntResMenuItem.hh
+++ b/src/IntResMenuItem.hh
@@ -49,7 +49,7 @@ public:
49 return ret; 49 return ret;
50 } 50 }
51 51
52 void click(int button, int time) { 52 void click(int button, int time, unsigned int mods) {
53 static int last_time = -201; 53 static int last_time = -201;
54 int inc_val = 1; 54 int inc_val = 1;
55 // check double click 55 // check double click
@@ -76,7 +76,7 @@ public:
76 // update label 76 // update label
77 updateLabel(); 77 updateLabel();
78 // call other commands 78 // call other commands
79 FbTk::MenuItem::click(button, time); 79 FbTk::MenuItem::click(button, time, mods);
80 80
81 // show new value, which for us means forcing a full menu update 81 // show new value, which for us means forcing a full menu update
82 // since the text is drawn onto the background! 82 // since the text is drawn onto the background!
diff --git a/src/LayerMenu.hh b/src/LayerMenu.hh
index 4f4a0a9..7882fd7 100644
--- a/src/LayerMenu.hh
+++ b/src/LayerMenu.hh
@@ -50,9 +50,9 @@ public:
50 FbTk::MenuItem(label), m_object(object), m_layernum(layernum) {} 50 FbTk::MenuItem(label), m_object(object), m_layernum(layernum) {}
51 51
52 bool isEnabled() const { return m_object->layerNumber() != m_layernum; } 52 bool isEnabled() const { return m_object->layerNumber() != m_layernum; }
53 void click(int button, int time) { 53 void click(int button, int time, unsigned int mods) {
54 m_object->moveToLayer(m_layernum); 54 m_object->moveToLayer(m_layernum);
55 FbTk::MenuItem::click(button, time); 55 FbTk::MenuItem::click(button, time, mods);
56 } 56 }
57 57
58private: 58private:
diff --git a/src/Remember.cc b/src/Remember.cc
index 827b1e3..2090008 100644
--- a/src/Remember.cc
+++ b/src/Remember.cc
@@ -99,6 +99,7 @@ public:
99 FbTk::MenuItem(label), 99 FbTk::MenuItem(label),
100 m_attrib(attrib) { 100 m_attrib(attrib) {
101 setToggleItem(true); 101 setToggleItem(true);
102 setCloseOnClick(false);
102 } 103 }
103 104
104 bool isSelected() const { 105 bool isSelected() const {
@@ -123,7 +124,7 @@ public:
123 return false; 124 return false;
124 } 125 }
125 126
126 void click(int button, int time) { 127 void click(int button, int time, unsigned int mods) {
127 // reconfigure only does stuff if the apps file has changed 128 // reconfigure only does stuff if the apps file has changed
128 Remember::instance().reconfigure(); 129 Remember::instance().reconfigure();
129 if (WindowCmd<void>::window() != 0) { 130 if (WindowCmd<void>::window() != 0) {
@@ -134,7 +135,7 @@ public:
134 } 135 }
135 } 136 }
136 Remember::instance().save(); 137 Remember::instance().save();
137 FbTk::MenuItem::click(button, time); 138 FbTk::MenuItem::click(button, time, mods);
138 } 139 }
139 140
140private: 141private:
diff --git a/src/Screen.cc b/src/Screen.cc
index a74ba0e..f26a0e6 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -181,12 +181,14 @@ public:
181 FbTk::RefCount<FbTk::Command> &cmd): 181 FbTk::RefCount<FbTk::Command> &cmd):
182 FbTk::MenuItem(label, cmd), 182 FbTk::MenuItem(label, cmd),
183 m_screen(screen), 183 m_screen(screen),
184 m_place(place) { } 184 m_place(place) {
185 setCloseOnClick(false);
186 }
185 187
186 bool isEnabled() const { return m_screen.getTabPlacement() != m_place; } 188 bool isEnabled() const { return m_screen.getTabPlacement() != m_place; }
187 void click(int button, int time) { 189 void click(int button, int time, unsigned int mods) {
188 m_screen.saveTabPlacement(m_place); 190 m_screen.saveTabPlacement(m_place);
189 FbTk::MenuItem::click(button, time); 191 FbTk::MenuItem::click(button, time, mods);
190 } 192 }
191 193
192 194
diff --git a/src/Slit.cc b/src/Slit.cc
index b18dddc..0b952c5 100644
--- a/src/Slit.cc
+++ b/src/Slit.cc
@@ -184,6 +184,7 @@ public:
184 setCommand(cmd); 184 setCommand(cmd);
185 FbTk::MenuItem::setSelected(client.visible()); 185 FbTk::MenuItem::setSelected(client.visible());
186 setToggleItem(true); 186 setToggleItem(true);
187 setCloseOnClick(false);
187 } 188 }
188 const string &label() const { 189 const string &label() const {
189 return m_client.matchName(); 190 return m_client.matchName();
@@ -191,7 +192,7 @@ public:
191 bool isSelected() const { 192 bool isSelected() const {
192 return m_client.visible(); 193 return m_client.visible();
193 } 194 }
194 void click(int button, int time) { 195 void click(int button, int time, unsigned int mods) {
195 if (button == 4 || button == 2) { // wheel up 196 if (button == 4 || button == 2) { // wheel up
196 m_slit.clientUp(&m_client); 197 m_slit.clientUp(&m_client);
197 } else if (button == 5 || button == 3) { // wheel down 198 } else if (button == 5 || button == 3) { // wheel down
@@ -199,7 +200,7 @@ public:
199 } else { 200 } else {
200 m_client.setVisible(!m_client.visible()); 201 m_client.setVisible(!m_client.visible());
201 FbTk::MenuItem::setSelected(m_client.visible()); 202 FbTk::MenuItem::setSelected(m_client.visible());
202 FbTk::MenuItem::click(button, time); 203 FbTk::MenuItem::click(button, time, mods);
203 } 204 }
204 } 205 }
205private: 206private:
@@ -214,16 +215,17 @@ public:
214 m_slit(slit), 215 m_slit(slit),
215 m_label(label) { 216 m_label(label) {
216 setLabel(m_label); // update label 217 setLabel(m_label); // update label
218 setCloseOnClick(false);
217 } 219 }
218 220
219 void click(int button, int time) { 221 void click(int button, int time, unsigned int mods) {
220 // toggle direction 222 // toggle direction
221 if (m_slit.direction() == Slit::HORIZONTAL) 223 if (m_slit.direction() == Slit::HORIZONTAL)
222 m_slit.setDirection(Slit::VERTICAL); 224 m_slit.setDirection(Slit::VERTICAL);
223 else 225 else
224 m_slit.setDirection(Slit::HORIZONTAL); 226 m_slit.setDirection(Slit::HORIZONTAL);
225 setLabel(m_label); 227 setLabel(m_label);
226 FbTk::MenuItem::click(button, time); 228 FbTk::MenuItem::click(button, time, mods);
227 } 229 }
228 230
229 void setLabel(const FbTk::FbString &label) { 231 void setLabel(const FbTk::FbString &label) {
@@ -245,12 +247,12 @@ class PlaceSlitMenuItem: public FbTk::MenuItem {
245public: 247public:
246 PlaceSlitMenuItem(const FbTk::FbString &label, Slit &slit, Slit::Placement place, FbTk::RefCount<FbTk::Command> &cmd): 248 PlaceSlitMenuItem(const FbTk::FbString &label, Slit &slit, Slit::Placement place, FbTk::RefCount<FbTk::Command> &cmd):
247 FbTk::MenuItem(label, cmd), m_slit(slit), m_place(place) { 249 FbTk::MenuItem(label, cmd), m_slit(slit), m_place(place) {
248 250 setCloseOnClick(false);
249 } 251 }
250 bool isEnabled() const { return m_slit.placement() != m_place; } 252 bool isEnabled() const { return m_slit.placement() != m_place; }
251 void click(int button, int time) { 253 void click(int button, int time, unsigned int mods) {
252 m_slit.setPlacement(m_place); 254 m_slit.setPlacement(m_place);
253 FbTk::MenuItem::click(button, time); 255 FbTk::MenuItem::click(button, time, mods);
254 } 256 }
255private: 257private:
256 Slit &m_slit; 258 Slit &m_slit;
diff --git a/src/Xinerama.hh b/src/Xinerama.hh
index 1cc15aa..f57c584 100644
--- a/src/Xinerama.hh
+++ b/src/Xinerama.hh
@@ -48,9 +48,9 @@ public:
48 FbTk::MenuItem(label), m_object(object), m_headnum(headnum) {} 48 FbTk::MenuItem(label), m_object(object), m_headnum(headnum) {}
49 49
50 bool isEnabled() const { return m_object.getOnHead() != m_headnum; } 50 bool isEnabled() const { return m_object.getOnHead() != m_headnum; }
51 void click(int button, int time) { 51 void click(int button, int time, unsigned int mods) {
52 m_object.saveOnHead(m_headnum); 52 m_object.saveOnHead(m_headnum);
53 FbTk::MenuItem::click(button, time); 53 FbTk::MenuItem::click(button, time, mods);
54 } 54 }
55 55
56private: 56private: