]> Dogcows Code - chaz/openbox/commitdiff
dont snap back, properly
authorDana Jansens <danakj@orodu.net>
Mon, 3 Feb 2003 01:59:32 +0000 (01:59 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 3 Feb 2003 01:59:32 +0000 (01:59 +0000)
scripts/motion.py

index 7714c0dee11f2cd5da847a2505dc38ad19f390f2..a6602e2d0b04683663b516eaed5975af1596f446 100644 (file)
@@ -95,7 +95,8 @@ def _do_move():
     x = _cx + _dx
     y = _cy + _dy
 
-    global edge_resistance, _last_x, _last_y
+    global edge_resistance
+    global _last_x, _last_y
     if edge_resistance:
         fs = _client.frame.size()
         w = _client.area().width() + fs.left + fs.right
@@ -119,8 +120,13 @@ def _do_move():
         if _last_y < y and y > b and y <= b + edge_resistance:
             y = b
 
-    _last_x = x
-    _last_y = y
+    global _inmove
+    if not _inmove:
+        _last_x = 0
+        _last_y = 0
+    else:
+        _last_x = x
+        _last_y = y
 
     global move_rubberband
     if move_rubberband:
This page took 0.022645 seconds and 4 git commands to generate.