]> Dogcows Code - chaz/openbox/blobdiff - src/actions.cc
do need display then
[chaz/openbox] / src / actions.cc
index af33f51c60d562914dd31cf7db99a2e4b4099f86..ceb55b6ccac677c12c7b1a86d289e7bc8cd1417a 100644 (file)
@@ -147,10 +147,14 @@ void OBActions::keyPressHandler(const XKeyEvent &e)
 
 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);
 }
 
 
This page took 0.025795 seconds and 4 git commands to generate.