3 def def_motion_press(data):
4 client = Openbox_findClient(openbox, data.window())
7 newi = [data.button(), data.xroot(), data.yroot()]
9 newi.append(new_Rect(OBClient_area(client)))
12 def def_motion_release(data):
14 button = data.button()
17 client = Openbox_findClient(openbox, data.window())
24 client = Openbox_findClient(openbox, data.window())
28 dx = data.xroot() - posqueue[0][1]
29 dy = data.yroot() - posqueue[0][2]
31 area = posqueue[0][3] # A Rect
33 if (type == Type_Titlebar) or (type == Type_Label):
34 OBClient_move(client, Rect_x(area) + dx, Rect_y(area) + dy)
35 elif type == Type_LeftGrip:
36 OBClient_resize(client, OBClient_TopRight,
37 Rect_width(area) - dx, Rect_height(area) + dy)
38 elif type == Type_RightGrip:
39 OBClient_resize(client, OBClient_TopLeft,
40 Rect_width(area) + dx, Rect_height(area) + dy)
43 client = Openbox_findClient(openbox, data.window())
46 OBClient_focus(client)
49 client = Openbox_findClient(openbox, data.window())
51 if leave_unfocus != 0:
52 OBClient_unfocus(client)
55 register(Action_EnterWindow, def_enter)
56 register(Action_LeaveWindow, def_leave)
58 register(Action_ButtonPress, def_motion_press)
59 register(Action_ButtonRelease, def_motion_release)
60 register(Action_MouseMotion, def_motion)
62 print "Loaded clientmotion.py"