diff options
author | Henrik Kinnunen <fluxgen@fluxbox.org> | 2008-05-13 13:50:17 (GMT) |
---|---|---|
committer | Henrik Kinnunen <fluxgen@fluxbox.org> | 2008-05-13 15:06:26 (GMT) |
commit | 5ecebae4770cbe7e4feea46d2c074a818f1c9662 (patch) | |
tree | 6ae650effda6528ebb5e40846a02dbe5a79e82d1 /src/IconbarTool.cc | |
parent | c31638038aabd93c74373c7ee00fbefbc68d28ae (diff) | |
download | fluxbox_pavel-5ecebae4770cbe7e4feea46d2c074a818f1c9662.zip fluxbox_pavel-5ecebae4770cbe7e4feea46d2c074a818f1c9662.tar.bz2 |
Fixed startup bug for window menu in iconbar.
The window menu in the iconbutton was not updated properly
the first time it was used ( before right clicking in the real
window titlebar).
Diffstat (limited to 'src/IconbarTool.cc')
-rw-r--r-- | src/IconbarTool.cc | 7 |
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> { | |||
214 | public: | 214 | public: |
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 | } |
228 | private: | 223 | private: |
229 | FluxboxWindow &m_win; | 224 | FluxboxWindow &m_win; |