more fun with global variables
This commit is contained in:
parent
920cb81caf
commit
fd0389d2e1
2 changed files with 7 additions and 3 deletions
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
#include "WinButton.hh"
|
#include "WinButton.hh"
|
||||||
#include "Window.hh"
|
#include "Window.hh"
|
||||||
|
#include "WindowCmd.hh"
|
||||||
#include "Screen.hh"
|
#include "Screen.hh"
|
||||||
#include "WinClient.hh"
|
#include "WinClient.hh"
|
||||||
#include "WinButtonTheme.hh"
|
#include "WinButtonTheme.hh"
|
||||||
|
@ -32,7 +33,7 @@
|
||||||
#endif // SHAPE
|
#endif // SHAPE
|
||||||
|
|
||||||
|
|
||||||
WinButton::WinButton(const FluxboxWindow &listen_to,
|
WinButton::WinButton(FluxboxWindow &listen_to,
|
||||||
FbTk::ThemeProxy<WinButtonTheme> &theme,
|
FbTk::ThemeProxy<WinButtonTheme> &theme,
|
||||||
FbTk::ThemeProxy<WinButtonTheme> &pressed,
|
FbTk::ThemeProxy<WinButtonTheme> &pressed,
|
||||||
Type buttontype, const FbTk::FbWindow &parent,
|
Type buttontype, const FbTk::FbWindow &parent,
|
||||||
|
@ -55,7 +56,10 @@ void WinButton::exposeEvent(XExposeEvent &event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void WinButton::buttonReleaseEvent(XButtonEvent &event) {
|
void WinButton::buttonReleaseEvent(XButtonEvent &event) {
|
||||||
|
WinClient *old = WindowCmd<void>::client();
|
||||||
|
WindowCmd<void>::setWindow(&m_listen_to);
|
||||||
FbTk::Button::buttonReleaseEvent(event);
|
FbTk::Button::buttonReleaseEvent(event);
|
||||||
|
WindowCmd<void>::setClient(old);
|
||||||
}
|
}
|
||||||
|
|
||||||
// when someone else tries to set the background, we may override it
|
// when someone else tries to set the background, we may override it
|
||||||
|
|
|
@ -39,7 +39,7 @@ class WinButton:public FbTk::Button, public FbTk::Observer {
|
||||||
public:
|
public:
|
||||||
/// draw type for the button
|
/// draw type for the button
|
||||||
enum Type {MAXIMIZE, MINIMIZE, SHADE, STICK, CLOSE, MENUICON};
|
enum Type {MAXIMIZE, MINIMIZE, SHADE, STICK, CLOSE, MENUICON};
|
||||||
WinButton(const FluxboxWindow &listen_to,
|
WinButton(FluxboxWindow &listen_to,
|
||||||
FbTk::ThemeProxy<WinButtonTheme> &theme,
|
FbTk::ThemeProxy<WinButtonTheme> &theme,
|
||||||
FbTk::ThemeProxy<WinButtonTheme> &pressed,
|
FbTk::ThemeProxy<WinButtonTheme> &pressed,
|
||||||
Type buttontype, const FbTk::FbWindow &parent, int x, int y,
|
Type buttontype, const FbTk::FbWindow &parent, int x, int y,
|
||||||
|
@ -60,7 +60,7 @@ public:
|
||||||
private:
|
private:
|
||||||
void drawType();
|
void drawType();
|
||||||
Type m_type; ///< the button type
|
Type m_type; ///< the button type
|
||||||
const FluxboxWindow &m_listen_to;
|
FluxboxWindow &m_listen_to;
|
||||||
FbTk::ThemeProxy<WinButtonTheme> &m_theme, &m_pressed_theme;
|
FbTk::ThemeProxy<WinButtonTheme> &m_theme, &m_pressed_theme;
|
||||||
|
|
||||||
FbTk::FbPixmap m_icon_pixmap;
|
FbTk::FbPixmap m_icon_pixmap;
|
||||||
|
|
Loading…
Reference in a new issue