some cleanups make the OBActions instance not static
Dana Jansens danakj@orodu.net
4 files changed,
9 insertions(+),
6 deletions(-)
M
src/actions.cc
→
src/actions.cc
@@ -147,6 +147,8 @@
void OBActions::motionHandler(const XMotionEvent &e) { + if (!e.same_screen) return; // this just gets stupid + // XXX: i can envision all sorts of crazy shit with this.. gestures, etc printf("GUILE: MOTION: win %lx modifiers %u x %d y %d\n", (long)e.window, e.state,
M
src/actions.hh
→
src/actions.hh
@@ -56,7 +56,9 @@ //! Remove a button/position from the _posqueue
void removePress(const XButtonEvent &e); public: + //! Constructs an OBActions object OBActions(); + //! Destroys the OBActions object virtual ~OBActions(); virtual void buttonPressHandler(const XButtonEvent &e);
M
src/openbox.cc
→
src/openbox.cc
@@ -51,7 +51,6 @@
namespace ob { Openbox *Openbox::instance = (Openbox *) 0; -OBActions *Openbox::actions = (OBActions *) 0; void Openbox::signalHandler(int signal)@@ -124,9 +123,9 @@ sigaction(SIGHUP, &action, (struct sigaction *) 0);
_property = new otk::OBProperty(); - Openbox::actions = new OBActions(); + _actions = new OBActions(); - setMasterHandler(Openbox::actions); // set as the master event handler + setMasterHandler(_actions); // set as the master event handler // create the mouse cursors we'll use _cursors.session = XCreateFontCursor(otk::OBDisplay::display, XC_left_ptr);
M
src/openbox.hh
→
src/openbox.hh
@@ -51,9 +51,6 @@ class does not need to be passed around to any of the other classes.
*/ static Openbox *instance; - //! The action interface through which all user-available actions occur - static OBActions *actions; - //! The posible running states of the window manager enum RunState { State_Starting, //!< The window manager is starting up (being created)@@ -114,6 +111,9 @@ in its constructor, so, it needs to be initialized <b>after</b> the display
is initialized in this class' constructor. */ otk::OBProperty *_property; + + //! The action interface through which all user-available actions occur + OBActions *_actions; //! The running state of the window manager RunState _state;