]> Dogcows Code - chaz/openbox/commitdiff
store the delta x/y for a motion sequence
authorDana Jansens <danakj@orodu.net>
Thu, 5 Dec 2002 13:52:10 +0000 (13:52 +0000)
committerDana Jansens <danakj@orodu.net>
Thu, 5 Dec 2002 13:52:10 +0000 (13:52 +0000)
src/actions.cc
src/actions.hh

index b83b521dd1794f6b96a0efe2cad72a0b4f77dd3a..ceb55b6ccac677c12c7b1a86d289e7bc8cd1417a 100644 (file)
@@ -149,10 +149,12 @@ void OBActions::motionHandler(const XMotionEvent &e)
 {
   if (!e.same_screen) return; // this just gets stupid
 
+  _dx = e.x - _posqueue[0]->pos.x();
+  _dy = e.y - _posqueue[0]->pos.y();
+  
   // 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,
-         e.x - _posqueue[0]->pos.x(), e.y - _posqueue[0]->pos.y());
+         (long)e.window, e.state, _dx, _dy);
 }
 
 
index e57593f78f6fbecdd1f792dc74bc129b793c92fc..9f65f7ed3ef284c055cacc6a6b6d0af0c556a692 100644 (file)
@@ -49,6 +49,8 @@ private:
     Used for motion events as the starting position.
   */
   ButtonPressAction *_posqueue[BUTTONS];
+  //! The delta x/y of the last motion sequence
+  int _dx, _dy;
 
   //! Insert a button/position in the _posqueue
   void insertPress(const XButtonEvent &e);
This page took 0.022645 seconds and 4 git commands to generate.