X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=scripts%2Fbehavior.py;h=5e475af8355fa1062d3ec6127b80a8b06e2a53c3;hb=8934a553dcfbb0ea6035d2de8ed86595d3703f5a;hp=3b407e101d1a3d6c690649785d5f697e64811c4f;hpb=5168a8add5ed46f74b615ecc60738c1113606734;p=chaz%2Fopenbox diff --git a/scripts/behavior.py b/scripts/behavior.py index 3b407e10..5e475af8 100644 --- a/scripts/behavior.py +++ b/scripts/behavior.py @@ -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)