From 699de0368cded603bc40e66b0d65a1001e8ec494 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 5 Dec 2002 13:52:10 +0000 Subject: [PATCH] store the delta x/y for a motion sequence --- src/actions.cc | 6 ++++-- src/actions.hh | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/actions.cc b/src/actions.cc index b83b521d..ceb55b6c 100644 --- a/src/actions.cc +++ b/src/actions.cc @@ -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); } diff --git a/src/actions.hh b/src/actions.hh index e57593f7..9f65f7ed 100644 --- a/src/actions.hh +++ b/src/actions.hh @@ -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); -- 2.39.2