summaryrefslogtreecommitdiff
path: root/src/FbMenu.cc
diff options
context:
space:
mode:
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}