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 "Window.hh"
|
||||
#include "WindowCmd.hh"
|
||||
#include "Screen.hh"
|
||||
#include "WinClient.hh"
|
||||
#include "WinButtonTheme.hh"
|
||||
|
@ -32,7 +33,7 @@
|
|||
#endif // SHAPE
|
||||
|
||||
|
||||
WinButton::WinButton(const FluxboxWindow &listen_to,
|
||||
WinButton::WinButton(FluxboxWindow &listen_to,
|
||||
FbTk::ThemeProxy<WinButtonTheme> &theme,
|
||||
FbTk::ThemeProxy<WinButtonTheme> &pressed,
|
||||
Type buttontype, const FbTk::FbWindow &parent,
|
||||
|
@ -55,7 +56,10 @@ void WinButton::exposeEvent(XExposeEvent &event) {
|
|||
}
|
||||
|
||||
void WinButton::buttonReleaseEvent(XButtonEvent &event) {
|
||||
WinClient *old = WindowCmd<void>::client();
|
||||
WindowCmd<void>::setWindow(&m_listen_to);
|
||||
FbTk::Button::buttonReleaseEvent(event);
|
||||
WindowCmd<void>::setClient(old);
|
||||
}
|
||||
|
||||
// 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:
|
||||
/// draw type for the button
|
||||
enum Type {MAXIMIZE, MINIMIZE, SHADE, STICK, CLOSE, MENUICON};
|
||||
WinButton(const FluxboxWindow &listen_to,
|
||||
WinButton(FluxboxWindow &listen_to,
|
||||
FbTk::ThemeProxy<WinButtonTheme> &theme,
|
||||
FbTk::ThemeProxy<WinButtonTheme> &pressed,
|
||||
Type buttontype, const FbTk::FbWindow &parent, int x, int y,
|
||||
|
@ -60,7 +60,7 @@ public:
|
|||
private:
|
||||
void drawType();
|
||||
Type m_type; ///< the button type
|
||||
const FluxboxWindow &m_listen_to;
|
||||
FluxboxWindow &m_listen_to;
|
||||
FbTk::ThemeProxy<WinButtonTheme> &m_theme, &m_pressed_theme;
|
||||
|
||||
FbTk::FbPixmap m_icon_pixmap;
|
||||
|
|
Loading…
Reference in a new issue