aboutsummaryrefslogtreecommitdiff
path: root/src/FbMenu.cc
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-02-11 18:17:45 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-02-11 18:17:45 (GMT)
commit611b6aa57e34ed8e52cb6b88c9adbafe4d67c6e2 (patch)
tree0d8edbf9e0356f7f93e87ca6970f684aabaae419 /src/FbMenu.cc
parentcd128d7a3e19e0608b992d5211d7ea88a73ed3cd (diff)
downloadfluxbox-611b6aa57e34ed8e52cb6b88c9adbafe4d67c6e2.zip
fluxbox-611b6aa57e34ed8e52cb6b88c9adbafe4d67c6e2.tar.bz2
more fun with the window menu
Diffstat (limited to 'src/FbMenu.cc')
-rw-r--r--src/FbMenu.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/FbMenu.cc b/src/FbMenu.cc
index 54b6c4a..12ee2f1 100644
--- a/src/FbMenu.cc
+++ b/src/FbMenu.cc
@@ -23,6 +23,9 @@
23 23
24#include "fluxbox.hh" 24#include "fluxbox.hh"
25#include "Screen.hh" 25#include "Screen.hh"
26#include "WindowCmd.hh"
27
28FluxboxWindow *FbMenu::s_window = 0;
26 29
27FbMenu::FbMenu(FbTk::ThemeProxy<FbTk::MenuTheme> &tm, 30FbMenu::FbMenu(FbTk::ThemeProxy<FbTk::MenuTheme> &tm,
28 FbTk::ImageControl &imgctrl, FbTk::XLayer &layer): 31 FbTk::ImageControl &imgctrl, FbTk::XLayer &layer):
@@ -31,6 +34,16 @@ FbMenu::FbMenu(FbTk::ThemeProxy<FbTk::MenuTheme> &tm,
31 34
32} 35}
33 36
37void FbMenu::show() {
38 WindowCmd<void>::setWindow(s_window);
39 FbTk::Menu::show();
40}
41
42void FbMenu::buttonPressEvent(XButtonEvent &be) {
43 WindowCmd<void>::setWindow(s_window);
44 FbTk::Menu::buttonPressEvent(be);
45}
46
34void FbMenu::buttonReleaseEvent(XButtonEvent &be) { 47void FbMenu::buttonReleaseEvent(XButtonEvent &be) {
35 BScreen *screen = Fluxbox::instance()->findScreen(screenNumber()); 48 BScreen *screen = Fluxbox::instance()->findScreen(screenNumber());
36 if (be.window == titleWindow() && isMoving() && screen) { 49 if (be.window == titleWindow() && isMoving() && screen) {
@@ -41,7 +54,13 @@ void FbMenu::buttonReleaseEvent(XButtonEvent &be) {
41 screen->getHeadWidth(head), 54 screen->getHeadWidth(head),
42 screen->getHeadHeight(head)); 55 screen->getHeadHeight(head));
43 } 56 }
57 WindowCmd<void>::setWindow(s_window);
44 58
45 // now get on with the show 59 // now get on with the show
46 FbTk::Menu::buttonReleaseEvent(be); 60 FbTk::Menu::buttonReleaseEvent(be);
47} 61}
62
63void FbMenu::keyPressEvent(XKeyEvent &ke) {
64 WindowCmd<void>::setWindow(s_window);
65 FbTk::Menu::keyPressEvent(ke);
66}