aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--src/FbMenu.cc18
-rw-r--r--src/FbMenu.hh1
-rw-r--r--src/FbTk/Menu.hh3
4 files changed, 24 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index a37fe57..f08d9f8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
1 (Format: Year/Month/Day) 1 (Format: Year/Month/Day)
2Changes for 1.1: 2Changes for 1.1:
3*07/06/04:
4 * Fix submenu placement with xinerama after moving the menu between heads,
5 bug #1479517 (Mark)
6 FbMenu.cc/hh FbTk/Menu.hh
3*07/06/03: 7*07/06/03:
4 * Deiconify when automatically tabbing to a minimized window with focus new 8 * Deiconify when automatically tabbing to a minimized window with focus new
5 windows on, bug #1716899 (Mark) 9 windows on, bug #1716899 (Mark)
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}
diff --git a/src/FbMenu.hh b/src/FbMenu.hh
index cfd49d1..53266bf 100644
--- a/src/FbMenu.hh
+++ b/src/FbMenu.hh
@@ -41,6 +41,7 @@ public:
41 void raise() { m_layeritem.raise(); } 41 void raise() { m_layeritem.raise(); }
42 void lower() { m_layeritem.lower(); } 42 void lower() { m_layeritem.lower(); }
43 void reconfigure(); 43 void reconfigure();
44 void buttonReleaseEvent(XButtonEvent &be);
44private: 45private:
45 FbTk::XLayerItem m_layeritem; 46 FbTk::XLayerItem m_layeritem;
46 std::auto_ptr<Shape> m_shape; 47 std::auto_ptr<Shape> m_shape;
diff --git a/src/FbTk/Menu.hh b/src/FbTk/Menu.hh
index 7ca4e39..20562de 100644
--- a/src/FbTk/Menu.hh
+++ b/src/FbTk/Menu.hh
@@ -105,7 +105,7 @@ public:
105 //@{ 105 //@{
106 void handleEvent(XEvent &event); 106 void handleEvent(XEvent &event);
107 void buttonPressEvent(XButtonEvent &bp); 107 void buttonPressEvent(XButtonEvent &bp);
108 void buttonReleaseEvent(XButtonEvent &br); 108 virtual void buttonReleaseEvent(XButtonEvent &br);
109 void motionNotifyEvent(XMotionEvent &mn); 109 void motionNotifyEvent(XMotionEvent &mn);
110 void exposeEvent(XExposeEvent &ee); 110 void exposeEvent(XExposeEvent &ee);
111 void keyPressEvent(XKeyEvent &ke); 111 void keyPressEvent(XKeyEvent &ke);
@@ -139,6 +139,7 @@ public:
139#endif 139#endif
140 inline bool isTorn() const { return m_torn; } 140 inline bool isTorn() const { return m_torn; }
141 inline bool isVisible() const { return m_visible; } 141 inline bool isVisible() const { return m_visible; }
142 inline bool isMoving() const { return m_moving; }
142 inline int screenNumber() const { return menu.window.screenNumber(); } 143 inline int screenNumber() const { return menu.window.screenNumber(); }
143 inline Window window() const { return menu.window.window(); } 144 inline Window window() const { return menu.window.window(); }
144 inline FbWindow &fbwindow() { return menu.window; } 145 inline FbWindow &fbwindow() { return menu.window; }