aboutsummaryrefslogtreecommitdiff
path: root/src/IconbarTool.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/IconbarTool.cc')
-rw-r--r--src/IconbarTool.cc7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/IconbarTool.cc b/src/IconbarTool.cc
index b2a57d0..b6e2900 100644
--- a/src/IconbarTool.cc
+++ b/src/IconbarTool.cc
@@ -214,16 +214,11 @@ class ShowMenu: public FbTk::Command<void> {
214public: 214public:
215 explicit ShowMenu(FluxboxWindow &win):m_win(win) { } 215 explicit ShowMenu(FluxboxWindow &win):m_win(win) { }
216 void execute() { 216 void execute() {
217 // hide the menu if it's already showing for this FluxboxWindow
218 if (m_win.menu().isVisible() && FbMenu::window() == &m_win) {
219 m_win.menu().hide();
220 return;
221 }
222 // get last button pos 217 // get last button pos
223 const XEvent &event = Fluxbox::instance()->lastEvent(); 218 const XEvent &event = Fluxbox::instance()->lastEvent();
224 int x = event.xbutton.x_root - (m_win.menu().width() / 2); 219 int x = event.xbutton.x_root - (m_win.menu().width() / 2);
225 int y = event.xbutton.y_root - (m_win.menu().height() / 2); 220 int y = event.xbutton.y_root - (m_win.menu().height() / 2);
226 m_win.showMenu(x, y); 221 m_win.popupMenu(x, y);
227 } 222 }
228private: 223private:
229 FluxboxWindow &m_win; 224 FluxboxWindow &m_win;