3 def def_motion_press(action, win, type, modifiers, button, xroot, yroot, time):
4 client = Openbox_findClient(openbox, win)
7 newi = [button, xroot, yroot]
9 newi.append(new_Rect(OBClient_area(client)))
12 def def_motion_release(action, win, type, modifiers, button, xroot, yroot,
17 client = Openbox_findClient(openbox, win)
23 def def_motion(action, win, type, modifiers, xroot, yroot, time):
24 client = Openbox_findClient(openbox, win)
28 dx = xroot - posqueue[0][1]
29 dy = yroot - posqueue[0][2]
31 area = posqueue[0][3] # A Rect
32 if (type == Type_Titlebar) or (type == Type_Label):
33 OBClient_move(client, Rect_x(area) + dx, Rect_y(area) + dy)
34 elif type == Type_LeftGrip:
35 OBClient_resize(client, OBClient_TopRight,
36 Rect_width(area) - dx, Rect_height(area) + dy)
37 elif type == Type_RightGrip:
38 OBClient_resize(client, OBClient_TopLeft,
39 Rect_width(area) + dx, Rect_height(area) + dy)
41 def def_enter(action, win, type, modifiers):
42 client = Openbox_findClient(openbox, win)
45 OBClient_focus(client)
47 def def_leave(action, win, type, modifiers):
48 client = Openbox_findClient(openbox, win)
50 if leave_unfocus != 0:
51 OBClient_unfocus(client)
54 register(Action_EnterWindow, def_enter)
55 register(Action_LeaveWindow, def_leave)
57 register(Action_ButtonPress, def_motion_press)
58 register(Action_ButtonRelease, def_motion_release)
59 register(Action_MouseMotion, def_motion)
61 print "Loaded clientmotion.py"