store the delta x/y for a motion sequence

This commit is contained in:
Dana Jansens 2002-12-05 13:52:10 +00:00
parent 52cb7bd11e
commit 699de0368c
2 changed files with 6 additions and 2 deletions

View 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);
}

View 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);