adjust default click-focus model a bit
This commit is contained in:
parent
88c4eecd5f
commit
3e889e72f5
1 changed files with 19 additions and 2 deletions
|
@ -19,7 +19,8 @@ def setup_click_focus(click_raise = 1):
|
||||||
ob.MouseAction.Press, callbacks.focus)
|
ob.MouseAction.Press, callbacks.focus)
|
||||||
ob.mbind("Middle", ob.MouseContext.Window,
|
ob.mbind("Middle", ob.MouseContext.Window,
|
||||||
ob.MouseAction.Press, callbacks.focus)
|
ob.MouseAction.Press, callbacks.focus)
|
||||||
#ob.mbind("A-Left", ob.MouseContext.Frame, ob.MouseAction.Press, focus)
|
ob.mbind("A-Left", ob.MouseContext.Frame,
|
||||||
|
ob.MouseAction.Press, callbacks.focus)
|
||||||
if click_raise:
|
if click_raise:
|
||||||
ob.mbind("Left", ob.MouseContext.Titlebar,
|
ob.mbind("Left", ob.MouseContext.Titlebar,
|
||||||
ob.MouseAction.Press, callbacks.raise_win)
|
ob.MouseAction.Press, callbacks.raise_win)
|
||||||
|
@ -37,6 +38,22 @@ def setup_sloppy_focus(click_focus = 1, click_raise = 0):
|
||||||
in a window can raise the window to the front of its stacking layer."""
|
in a window can raise the window to the front of its stacking layer."""
|
||||||
ob.ebind(ob.EventAction.EnterWindow, callbacks.focus)
|
ob.ebind(ob.EventAction.EnterWindow, callbacks.focus)
|
||||||
if click_focus:
|
if click_focus:
|
||||||
setup_click_focus(click_raise)
|
ob.mbind("Left", ob.MouseContext.Titlebar,
|
||||||
|
ob.MouseAction.Press, callbacks.focus)
|
||||||
|
ob.mbind("Left", ob.MouseContext.Handle,
|
||||||
|
ob.MouseAction.Press, callbacks.focus)
|
||||||
|
ob.mbind("Left", ob.MouseContext.Grip,
|
||||||
|
ob.MouseAction.Press, callbacks.focus)
|
||||||
|
ob.mbind("Left", ob.MouseContext.Window,
|
||||||
|
ob.MouseAction.Press, callbacks.focus)
|
||||||
|
if click_raise:
|
||||||
|
ob.mbind("Left", ob.MouseContext.Titlebar,
|
||||||
|
ob.MouseAction.Press, callbacks.raise_win)
|
||||||
|
ob.mbind("Left", ob.MouseContext.Handle,
|
||||||
|
ob.MouseAction.Press, callbacks.raise_win)
|
||||||
|
ob.mbind("Left", ob.MouseContext.Grip,
|
||||||
|
ob.MouseAction.Press, callbacks.raise_win)
|
||||||
|
ob.mbind("Left", ob.MouseContext.Window,
|
||||||
|
ob.MouseAction.Press, callbacks.raise_win)
|
||||||
|
|
||||||
print "Loaded focusmodel.py"
|
print "Loaded focusmodel.py"
|
||||||
|
|
Loading…
Reference in a new issue