aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/IconbarTool.cc2
-rw-r--r--src/Toolbar.cc3
-rw-r--r--src/Window.cc4
3 files changed, 8 insertions, 1 deletions
diff --git a/src/IconbarTool.cc b/src/IconbarTool.cc
index 128b71e..84c91ef 100644
--- a/src/IconbarTool.cc
+++ b/src/IconbarTool.cc
@@ -194,6 +194,7 @@ class ShowMenu: public FbTk::Command<void> {
194public: 194public:
195 explicit ShowMenu(FluxboxWindow &win):m_win(win) { } 195 explicit ShowMenu(FluxboxWindow &win):m_win(win) { }
196 void execute() { 196 void execute() {
197 FbTk::Menu::hideShownMenu();
197 // get last button pos 198 // get last button pos
198 const XEvent &e = Fluxbox::instance()->lastEvent(); 199 const XEvent &e = Fluxbox::instance()->lastEvent();
199 m_win.popupMenu(e.xbutton.x_root, e.xbutton.y_root); 200 m_win.popupMenu(e.xbutton.x_root, e.xbutton.y_root);
@@ -206,6 +207,7 @@ class FocusCommand: public FbTk::Command<void> {
206public: 207public:
207 explicit FocusCommand(Focusable &win): m_win(win) { } 208 explicit FocusCommand(Focusable &win): m_win(win) { }
208 void execute() { 209 void execute() {
210 FbTk::Menu::hideShownMenu();
209 // this needs to be a local variable, as this object could be destroyed 211 // this needs to be a local variable, as this object could be destroyed
210 // if the workspace is changed. 212 // if the workspace is changed.
211 FluxboxWindow *fbwin = m_win.fbwindow(); 213 FluxboxWindow *fbwin = m_win.fbwindow();
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index bfaec94..f343552 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.cc
@@ -514,6 +514,9 @@ void Toolbar::reconfigure() {
514 514
515void Toolbar::buttonPressEvent(XButtonEvent &be) { 515void Toolbar::buttonPressEvent(XButtonEvent &be) {
516 Display *dpy = Fluxbox::instance()->display(); 516 Display *dpy = Fluxbox::instance()->display();
517
518 FbTk::Menu::hideShownMenu();
519
517 if (be.subwindow) { 520 if (be.subwindow) {
518 // Do not intercept mouse events that are meant for the tray icon 521 // Do not intercept mouse events that are meant for the tray icon
519 if (SystemTray::doesControl(be.subwindow)) { 522 if (SystemTray::doesControl(be.subwindow)) {
diff --git a/src/Window.cc b/src/Window.cc
index ad58263..1e15dc8 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -2415,6 +2415,8 @@ void FluxboxWindow::buttonPressEvent(XButtonEvent &be) {
2415 m_last_button_y = be.y_root; 2415 m_last_button_y = be.y_root;
2416 m_last_pressed_button = be.button; 2416 m_last_pressed_button = be.button;
2417 2417
2418 FbTk::Menu::hideShownMenu();
2419
2418 Keys *k = Fluxbox::instance()->keys(); 2420 Keys *k = Fluxbox::instance()->keys();
2419 int context = 0; 2421 int context = 0;
2420 context = frame().getContext(be.subwindow ? be.subwindow : be.window, be.x_root, be.y_root); 2422 context = frame().getContext(be.subwindow ? be.subwindow : be.window, be.x_root, be.y_root);
@@ -2448,7 +2450,7 @@ void FluxboxWindow::buttonPressEvent(XButtonEvent &be) {
2448 m_button_grab_x = be.x_root - frame().x() - frame().window().borderWidth(); 2450 m_button_grab_x = be.x_root - frame().x() - frame().window().borderWidth();
2449 m_button_grab_y = be.y_root - frame().y() - frame().window().borderWidth(); 2451 m_button_grab_y = be.y_root - frame().y() - frame().window().borderWidth();
2450 } 2452 }
2451 FbTk::Menu::hideShownMenu(); 2453
2452 if (!m_focused && acceptsFocus() && m_click_focus) 2454 if (!m_focused && acceptsFocus() && m_click_focus)
2453 focus(); 2455 focus();
2454 2456