aboutsummaryrefslogtreecommitdiff
path: root/src/FbMenu.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbMenu.cc')
-rw-r--r--src/FbMenu.cc18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/FbMenu.cc b/src/FbMenu.cc
index bcef502..040a881 100644
--- a/src/FbMenu.cc
+++ b/src/FbMenu.cc
@@ -23,8 +23,10 @@
23 23
24 24
25#include "FbMenu.hh" 25#include "FbMenu.hh"
26#include "MenuTheme.hh"
27 26
27#include "fluxbox.hh"
28#include "MenuTheme.hh"
29#include "Screen.hh"
28#include "Shape.hh" 30#include "Shape.hh"
29 31
30FbMenu::FbMenu(MenuTheme &tm, FbTk::ImageControl &imgctrl, 32FbMenu::FbMenu(MenuTheme &tm, FbTk::ImageControl &imgctrl,
@@ -54,3 +56,17 @@ void FbMenu::reconfigure() {
54 FbTk::Menu::reconfigure(); 56 FbTk::Menu::reconfigure();
55} 57}
56 58
59void FbMenu::buttonReleaseEvent(XButtonEvent &be) {
60 BScreen *screen = Fluxbox::instance()->findScreen(screenNumber());
61 if (be.window == titleWindow() && isMoving() && screen) {
62 // menu stopped moving, so update head
63 int head = screen->getHead(be.x_root, be.y_root);
64 setScreen(screen->getHeadX(head),
65 screen->getHeadY(head),
66 screen->getHeadWidth(head),
67 screen->getHeadHeight(head));
68 }
69
70 // now get on with the show
71 FbTk::Menu::buttonReleaseEvent(be);
72}