summaryrefslogtreecommitdiff
path: root/scripts/clientmotion.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/clientmotion.py')
-rw-r--r--scripts/clientmotion.py22
1 files changed, 6 insertions, 16 deletions
diff --git a/scripts/clientmotion.py b/scripts/clientmotion.py
index e34afed4..bd446f87 100644
--- a/scripts/clientmotion.py
+++ b/scripts/clientmotion.py
@@ -9,24 +9,11 @@ def def_motion_press(action, win, type, modifiers, button, xroot, yroot, time):
newi.append(new_Rect(OBClient_area(client)))
posqueue.append(newi)
- # ButtonPressAction *a = _posqueue[BUTTONS - 1];
- # for (int i=BUTTONS-1; i>0;)
- # _posqueue[i] = _posqueue[--i];
- # _posqueue[0] = a;
- # a->button = e.button;
- # a->pos.setPoint(e.x_root, e.y_root);
-
- # OBClient *c = Openbox::instance->findClient(e.window);
- # // if it's not defined, they should have clicked on the root window, so this
- # // area would be meaningless anyways
- # if (c) a->clientarea = c->area();
-
def def_motion_release(action, win, type, modifiers, button, xroot, yroot,
time):
global posqueue
for i in posqueue:
if i[0] == button:
- print "hi"
client = Openbox_findClient(openbox, win)
if client:
delete_Rect(i[3])
@@ -53,7 +40,7 @@ def def_motion(action, win, type, modifiers, xroot, yroot, time):
if not client: return
if (type == Type_Titlebar) or (type == Type_Label):
- def_do_move(client, xroot, yroot)
+ def_do_motion(client, xroot, yroot)
elif type == Type_LeftGrip:
def_do_resize(client, xroot, yroot, OBClient_TopRight)
elif type == Type_RightGrip:
@@ -62,15 +49,18 @@ def def_motion(action, win, type, modifiers, xroot, yroot, time):
def def_enter(action, win, type, modifiers):
client = Openbox_findClient(openbox, win)
if not client: return
- OBClient_focus(client)
+ if enter_focus != 0:
+ OBClient_focus(client)
def def_leave(action, win, type, modifiers):
client = Openbox_findClient(openbox, win)
if not client: return
+ if leave_unfocus != 0:
+ OBClient_unfocus(client)
register(Action_EnterWindow, def_enter)
-#register(Action_LeaveWindow, def_leave)
+register(Action_LeaveWindow, def_leave)
register(Action_ButtonPress, def_motion_press)
register(Action_ButtonRelease, def_motion_release)