some cleanups
make the OBActions instance not static
This commit is contained in:
parent
7dc834cc93
commit
4e0b5fdef4
4 changed files with 9 additions and 6 deletions
|
@ -147,6 +147,8 @@ void OBActions::keyPressHandler(const XKeyEvent &e)
|
|||
|
||||
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,
|
||||
|
|
|
@ -56,7 +56,9 @@ private:
|
|||
void removePress(const XButtonEvent &e);
|
||||
|
||||
public:
|
||||
//! Constructs an OBActions object
|
||||
OBActions();
|
||||
//! Destroys the OBActions object
|
||||
virtual ~OBActions();
|
||||
|
||||
virtual void buttonPressHandler(const XButtonEvent &e);
|
||||
|
|
|
@ -51,7 +51,6 @@ extern "C" {
|
|||
namespace ob {
|
||||
|
||||
Openbox *Openbox::instance = (Openbox *) 0;
|
||||
OBActions *Openbox::actions = (OBActions *) 0;
|
||||
|
||||
|
||||
void Openbox::signalHandler(int signal)
|
||||
|
@ -124,9 +123,9 @@ Openbox::Openbox(int argc, char **argv)
|
|||
|
||||
_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);
|
||||
|
|
|
@ -51,9 +51,6 @@ public:
|
|||
*/
|
||||
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)
|
||||
|
@ -115,6 +112,9 @@ private:
|
|||
*/
|
||||
otk::OBProperty *_property;
|
||||
|
||||
//! The action interface through which all user-available actions occur
|
||||
OBActions *_actions;
|
||||
|
||||
//! The running state of the window manager
|
||||
RunState _state;
|
||||
|
||||
|
|
Loading…
Reference in a new issue