summaryrefslogtreecommitdiff
path: root/scripts/clicks.py
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-12-25 22:02:34 +0000
committerDana Jansens <danakj@orodu.net>2002-12-25 22:02:34 +0000
commit2ae2b257d39ea62640c2590f794e4275c6db1cd4 (patch)
treef26abe4a0601d263fbc460eddc012c1d674c868b /scripts/clicks.py
parent3c61812e588fb3c34d0713d7f82ccbf21091f032 (diff)
might not compile... ob uses its own widgets now, which subclass only the base otk widget. working on compressing focus events and handling them etc.
Diffstat (limited to 'scripts/clicks.py')
-rw-r--r--scripts/clicks.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/scripts/clicks.py b/scripts/clicks.py
index 3c958bf4..39effd53 100644
--- a/scripts/clicks.py
+++ b/scripts/clicks.py
@@ -18,11 +18,15 @@ def def_click_client(action, win, type, modifiers, button, time):
elif button == Button5:
print "OBClient_unshade(client)"
-def def_click_model(action, win, type, modifiers, button, time):
+def def_press_model(action, win, type, modifiers, button, xroot, yroot, time):
if button != Button1: return
client = Openbox_findClient(openbox, win)
- if not client: return
- print "OBClient_focus(client)"
+ if not client or (type == Type_StickyButton or
+ type == Type_IconifyButton or
+ type == Type_MaximizeButton or
+ type == Type_CloseButton):
+ return
+ OBClient_focus(client)
print "OBClient_raise(client)"
def def_click_root(action, win, type, modifiers, button, time):
@@ -46,7 +50,7 @@ def def_doubleclick_client(action, win, type, modifiers, button, time):
print "OBClient_toggleshade(client)"
-register(Action_Click, def_click_model)
+preregister(Action_ButtonPress, def_press_model)
register(Action_Click, def_click_client)
register(Action_Click, def_click_root)
register(Action_DoubleClick, def_doubleclick_client)