]> Dogcows Code - chaz/openbox/blobdiff - scripts/behavior.py
formatting of comment
[chaz/openbox] / scripts / behavior.py
index 3b407e101d1a3d6c690649785d5f697e64811c4f..5e475af8355fa1062d3ec6127b80a8b06e2a53c3 100644 (file)
@@ -6,6 +6,7 @@
 
 import ob
 import callbacks
+import motion
 
 def setup_window_clicks():
     """Sets up the default bindings for various mouse buttons for various
@@ -26,16 +27,26 @@ def setup_window_clicks():
         * Double-left click on a window's titlebar will toggle shading it
     """
     ob.mbind("A-Left", ob.MouseContext.Frame,
-             ob.MouseAction.Motion, callbacks.move)
+             ob.MouseAction.Motion, motion.move)
+    ob.mbind("A-Left", ob.MouseContext.Frame,
+             ob.MouseAction.Release, motion.end_move)
+    ob.mbind("Left", ob.MouseContext.Titlebar,
+             ob.MouseAction.Motion, motion.move)
     ob.mbind("Left", ob.MouseContext.Titlebar,
-             ob.MouseAction.Motion, callbacks.move)
+             ob.MouseAction.Release, motion.end_move)
+    ob.mbind("Left", ob.MouseContext.Handle,
+             ob.MouseAction.Motion, motion.move)
     ob.mbind("Left", ob.MouseContext.Handle,
-             ob.MouseAction.Motion, callbacks.move)
+             ob.MouseAction.Release, motion.end_move)
 
     ob.mbind("A-Right", ob.MouseContext.Frame,
-             ob.MouseAction.Motion, callbacks.resize)
+             ob.MouseAction.Motion, motion.resize)
+    ob.mbind("A-Right", ob.MouseContext.Frame,
+             ob.MouseAction.Release, motion.end_resize)
+    ob.mbind("Left", ob.MouseContext.Grip,
+             ob.MouseAction.Motion, motion.resize)
     ob.mbind("Left", ob.MouseContext.Grip,
-             ob.MouseAction.Motion, callbacks.resize)
+             ob.MouseAction.Release, motion.end_resize)
 
     ob.mbind("Left", ob.MouseContext.Titlebar,
              ob.MouseAction.Press, callbacks.raise_win)
This page took 0.025183 seconds and 4 git commands to generate.