all repos — fluxbox @ fd0389d2e1c28e7dcd1507f76ed37eb8366c4af0

custom fork of the fluxbox windowmanager

more fun with global variables
Mark Tiefenbruck mark@fluxbox.org
commit

fd0389d2e1c28e7dcd1507f76ed37eb8366c4af0

parent

920cb81caf2b3b86ad91f9a7290f7383af7ec0d7

2 files changed, 7 insertions(+), 3 deletions(-)

jump to
M src/WinButton.ccsrc/WinButton.cc

@@ -21,6 +21,7 @@ // DEALINGS IN THE SOFTWARE.

#include "WinButton.hh" #include "Window.hh" +#include "WindowCmd.hh" #include "Screen.hh" #include "WinClient.hh" #include "WinButtonTheme.hh"

@@ -32,7 +33,7 @@ #include <X11/extensions/shape.h>

#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 @@ drawType();

} 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
M src/WinButton.hhsrc/WinButton.hh

@@ -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 @@ void update(FbTk::Subject *subj);

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;