]> Dogcows Code - chaz/openbox/commitdiff
some cleanups
authorDana Jansens <danakj@orodu.net>
Wed, 4 Dec 2002 11:50:20 +0000 (11:50 +0000)
committerDana Jansens <danakj@orodu.net>
Wed, 4 Dec 2002 11:50:20 +0000 (11:50 +0000)
make the OBActions instance not static

src/actions.cc
src/actions.hh
src/openbox.cc
src/openbox.hh

index af33f51c60d562914dd31cf7db99a2e4b4099f86..b83b521dd1794f6b96a0efe2cad72a0b4f77dd3a 100644 (file)
@@ -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,
index 3d45966e171125e7483c35cbbc58e95d915c5e57..e57593f78f6fbecdd1f792dc74bc129b793c92fc 100644 (file)
@@ -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);
index 24ea9b2e07c75a7749b4c4f3df8d7f7d38f64b0a..18c4a5ca6e45697e874176b06e2e705adadec955 100644 (file)
@@ -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);
index b6c3d6d19f6581fb8f03750ed09119ed7ca20797..abdcfef386968d922e4a301b285678a82f6a585a 100644 (file)
@@ -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;
 
This page took 0.02525 seconds and 4 git commands to generate.