summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarkt <markt>2007-06-03 23:51:11 (GMT)
committermarkt <markt>2007-06-03 23:51:11 (GMT)
commit8f89c86592a27a175f6a104730fa92a81388f4a8 (patch)
treea0358ab1f27c2f0b6d83a0dd4b3bfcd209e84a43
parentc16f838abfbe0808b1b05d6df9abab8a34538c6f (diff)
downloadfluxbox_lack-8f89c86592a27a175f6a104730fa92a81388f4a8.zip
fluxbox_lack-8f89c86592a27a175f6a104730fa92a81388f4a8.tar.bz2
update menu xinerama settings after moving
-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 df0da3b..be50648 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
1 (Format: Year/Month/Day) 1 (Format: Year/Month/Day)
2Changes for 1.0.0: 2Changes for 1.0.0:
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 c77b0c0..e6c249d 100644
--- a/src/FbTk/Menu.hh
+++ b/src/FbTk/Menu.hh
@@ -104,7 +104,7 @@ public:
104 //@{ 104 //@{
105 void handleEvent(XEvent &event); 105 void handleEvent(XEvent &event);
106 void buttonPressEvent(XButtonEvent &bp); 106 void buttonPressEvent(XButtonEvent &bp);
107 void buttonReleaseEvent(XButtonEvent &br); 107 virtual void buttonReleaseEvent(XButtonEvent &br);
108 void motionNotifyEvent(XMotionEvent &mn); 108 void motionNotifyEvent(XMotionEvent &mn);
109 void exposeEvent(XExposeEvent &ee); 109 void exposeEvent(XExposeEvent &ee);
110 void keyPressEvent(XKeyEvent &ke); 110 void keyPressEvent(XKeyEvent &ke);
@@ -138,6 +138,7 @@ public:
138#endif 138#endif
139 inline bool isTorn() const { return m_torn; } 139 inline bool isTorn() const { return m_torn; }
140 inline bool isVisible() const { return m_visible; } 140 inline bool isVisible() const { return m_visible; }
141 inline bool isMoving() const { return m_moving; }
141 inline int screenNumber() const { return menu.window.screenNumber(); } 142 inline int screenNumber() const { return menu.window.screenNumber(); }
142 inline Window window() const { return menu.window.window(); } 143 inline Window window() const { return menu.window.window(); }
143 inline FbWindow &fbwindow() { return menu.window; } 144 inline FbWindow &fbwindow() { return menu.window; }