1 def def_click_client(data):
2 client = Openbox_findClient(openbox, data.window())
7 if button == 1 and type == Type_CloseButton:
9 elif button <= 3 and type == Type_MaximizeButton:
10 print "OBClient_maximize(client)"
11 elif button == 1 and type == Type_IconifyButton:
12 print "OBClient_iconify(client)"
13 elif button == 1 and type == Type_StickyButton:
14 print "OBClient_sendtodesktop(client, 0xffffffff)"
15 elif type == Type_Titlebar or type == Type_CloseButton or \
16 type == Type_MaximizeButton or type == Type_IconifyButton or \
17 type == Type_StickyButton or type == Type_Label:
19 print "OBClient_shade(client)"
21 print "OBClient_unshade(client)"
23 def def_press_model(data):
24 if data.button() != 1: return
25 client = Openbox_findClient(openbox, data.window())
26 if not client or (type == Type_StickyButton or
27 type == Type_IconifyButton or
28 type == Type_MaximizeButton or
29 type == Type_CloseButton):
32 OBClient_focus(client)
34 print "OBClient_raise(client)"
36 def def_press_root(data):
37 button = data.button()
40 print "nothing probly.."
41 client = Openbox_focusedClient(openbox)
42 if client: OBClient_unfocus(client)
44 print "workspace menu"
48 print "next workspace"
50 print "previous workspace"
52 def def_doubleclick_client(data):
53 client = Openbox_findClient(openbox, data.window())
56 button = data.button()
57 if button == 1 and (type == Type_Titlebar or type == Type_Label):
58 print "OBClient_toggleshade(client)"
61 register(Action_ButtonPress, def_press_model, 1)
62 register(Action_Click, def_click_client)
63 register(Action_ButtonPress, def_press_root)
64 register(Action_DoubleClick, def_doubleclick_client)
66 print "Loaded clicks.py"