From 225d4302d0b2bd40d03d3bfa54116c0adfe3143e Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 30 Jan 2003 20:51:41 +0000 Subject: popups for moving and resizing --- scripts/behavior.py | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'scripts/behavior.py') 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) -- cgit v1.2.3