aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-08-30 19:24:14 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-08-30 19:24:14 (GMT)
commitfd0389d2e1c28e7dcd1507f76ed37eb8366c4af0 (patch)
tree59db037a8317f498ab93ad8dc122847256d5f43c /src
parent920cb81caf2b3b86ad91f9a7290f7383af7ec0d7 (diff)
downloadfluxbox_pavel-fd0389d2e1c28e7dcd1507f76ed37eb8366c4af0.zip
fluxbox_pavel-fd0389d2e1c28e7dcd1507f76ed37eb8366c4af0.tar.bz2
more fun with global variables
Diffstat (limited to 'src')
-rw-r--r--src/WinButton.cc6
-rw-r--r--src/WinButton.hh4
2 files changed, 7 insertions, 3 deletions
diff --git a/src/WinButton.cc b/src/WinButton.cc
index e8cf0bd..d64034e 100644
--- a/src/WinButton.cc
+++ b/src/WinButton.cc
@@ -21,6 +21,7 @@
21 21
22#include "WinButton.hh" 22#include "WinButton.hh"
23#include "Window.hh" 23#include "Window.hh"
24#include "WindowCmd.hh"
24#include "Screen.hh" 25#include "Screen.hh"
25#include "WinClient.hh" 26#include "WinClient.hh"
26#include "WinButtonTheme.hh" 27#include "WinButtonTheme.hh"
@@ -32,7 +33,7 @@
32#endif // SHAPE 33#endif // SHAPE
33 34
34 35
35WinButton::WinButton(const FluxboxWindow &listen_to, 36WinButton::WinButton(FluxboxWindow &listen_to,
36 FbTk::ThemeProxy<WinButtonTheme> &theme, 37 FbTk::ThemeProxy<WinButtonTheme> &theme,
37 FbTk::ThemeProxy<WinButtonTheme> &pressed, 38 FbTk::ThemeProxy<WinButtonTheme> &pressed,
38 Type buttontype, const FbTk::FbWindow &parent, 39 Type buttontype, const FbTk::FbWindow &parent,
@@ -55,7 +56,10 @@ void WinButton::exposeEvent(XExposeEvent &event) {
55} 56}
56 57
57void WinButton::buttonReleaseEvent(XButtonEvent &event) { 58void WinButton::buttonReleaseEvent(XButtonEvent &event) {
59 WinClient *old = WindowCmd<void>::client();
60 WindowCmd<void>::setWindow(&m_listen_to);
58 FbTk::Button::buttonReleaseEvent(event); 61 FbTk::Button::buttonReleaseEvent(event);
62 WindowCmd<void>::setClient(old);
59} 63}
60 64
61// when someone else tries to set the background, we may override it 65// when someone else tries to set the background, we may override it
diff --git a/src/WinButton.hh b/src/WinButton.hh
index db2fdf9..7f40f1a 100644
--- a/src/WinButton.hh
+++ b/src/WinButton.hh
@@ -39,7 +39,7 @@ class WinButton:public FbTk::Button, public FbTk::Observer {
39public: 39public:
40 /// draw type for the button 40 /// draw type for the button
41 enum Type {MAXIMIZE, MINIMIZE, SHADE, STICK, CLOSE, MENUICON}; 41 enum Type {MAXIMIZE, MINIMIZE, SHADE, STICK, CLOSE, MENUICON};
42 WinButton(const FluxboxWindow &listen_to, 42 WinButton(FluxboxWindow &listen_to,
43 FbTk::ThemeProxy<WinButtonTheme> &theme, 43 FbTk::ThemeProxy<WinButtonTheme> &theme,
44 FbTk::ThemeProxy<WinButtonTheme> &pressed, 44 FbTk::ThemeProxy<WinButtonTheme> &pressed,
45 Type buttontype, const FbTk::FbWindow &parent, int x, int y, 45 Type buttontype, const FbTk::FbWindow &parent, int x, int y,
@@ -60,7 +60,7 @@ public:
60private: 60private:
61 void drawType(); 61 void drawType();
62 Type m_type; ///< the button type 62 Type m_type; ///< the button type
63 const FluxboxWindow &m_listen_to; 63 FluxboxWindow &m_listen_to;
64 FbTk::ThemeProxy<WinButtonTheme> &m_theme, &m_pressed_theme; 64 FbTk::ThemeProxy<WinButtonTheme> &m_theme, &m_pressed_theme;
65 65
66 FbTk::FbPixmap m_icon_pixmap; 66 FbTk::FbPixmap m_icon_pixmap;