summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-01-03 05:26:04 +0000
committerDana Jansens <danakj@orodu.net>2003-01-03 05:26:04 +0000
commitca3e463057ebf8a7a48a5997aedc062cdac72f3f (patch)
tree38c809333c9e11626d87bbd78a08cbe05169d43b /scripts
parentb35dae95a5cdb902f1661b9572af47c3f55c975c (diff)
moving a window is possible once again
Diffstat (limited to 'scripts')
-rw-r--r--scripts/clicks.py66
-rw-r--r--scripts/clientmotion.py75
2 files changed, 0 insertions, 141 deletions
diff --git a/scripts/clicks.py b/scripts/clicks.py
deleted file mode 100644
index a9c2fec1..00000000
--- a/scripts/clicks.py
+++ /dev/null
@@ -1,66 +0,0 @@
-def def_click_client(data):
- client = Openbox_findClient(openbox, data.window())
- if not client: return
-
- button = data.button()
- type = data.target()
- if button == 1 and type == Type_CloseButton:
- OBClient_close(client)
- elif button <= 3 and type == Type_MaximizeButton:
- print "OBClient_maximize(client)"
- elif button == 1 and type == Type_IconifyButton:
- print "OBClient_iconify(client)"
- elif button == 1 and type == Type_StickyButton:
- print "OBClient_sendtodesktop(client, 0xffffffff)"
- elif type == Type_Titlebar or type == Type_CloseButton or \
- type == Type_MaximizeButton or type == Type_IconifyButton or \
- type == Type_StickyButton or type == Type_Label:
- if button == 4:
- print "OBClient_shade(client)"
- elif button == 5:
- print "OBClient_unshade(client)"
-
-def def_press_model(data):
- if data.button() != 1: return
- client = Openbox_findClient(openbox, data.window())
- if not client or (type == Type_StickyButton or
- type == Type_IconifyButton or
- type == Type_MaximizeButton or
- type == Type_CloseButton):
- return
- if click_focus != 0:
- OBClient_focus(client)
- if click_raise != 0:
- print "OBClient_raise(client)"
-
-def def_press_root(data):
- button = data.button()
- if type == Type_Root:
- if button == 1:
- print "nothing probly.."
- client = Openbox_focusedClient(openbox)
- if client: OBClient_unfocus(client)
- elif button == 2:
- print "workspace menu"
- elif button == 3:
- print "root menu"
- elif button == 4:
- print "next workspace"
- elif button == 5:
- print "previous workspace"
-
-def def_doubleclick_client(data):
- client = Openbox_findClient(openbox, data.window())
- if not client: return
-
- button = data.button()
- if button == 1 and (type == Type_Titlebar or type == Type_Label):
- print "OBClient_toggleshade(client)"
-
-
-register(Action_ButtonPress, def_press_model, 1)
-register(Action_Click, def_click_client)
-register(Action_ButtonPress, def_press_root)
-register(Action_DoubleClick, def_doubleclick_client)
-
-print "Loaded clicks.py"
diff --git a/scripts/clientmotion.py b/scripts/clientmotion.py
deleted file mode 100644
index ec1da0ab..00000000
--- a/scripts/clientmotion.py
+++ /dev/null
@@ -1,75 +0,0 @@
-posqueue = [];
-
-def def_motion_press(data):
- client = Openbox_findClient(openbox, data.window())
-
- global posqueue
- newi = [data.button(), data.xroot(), data.yroot()]
- if client:
- newi.append(new_Rect(OBClient_area(client)))
- posqueue.append(newi)
-
-def def_motion_release(data):
- global posqueue
- button = data.button()
- for i in posqueue:
- if i[0] == button:
- client = Openbox_findClient(openbox, data.window())
- if client:
- delete_Rect(i[3])
- posqueue.remove(i)
- break
-
-def def_do_move(xroot, yroot, client):
- global posqueue
- dx = xroot - posqueue[0][1]
- dy = yroot - posqueue[0][2]
- area = posqueue[0][3] # A Rect
- OBClient_move(client, Rect_x(area) + dx, Rect_y(area) + dy)
-
-def def_do_resize(xroot, yroot, client, anchor_corner):
- global posqueue
- dx = xroot - posqueue[0][1]
- dy = yroot - posqueue[0][2]
- OBClient_resize(client, anchor_corner,
- Rect_width(area) - dx, Rect_height(area) + dy)
-
-def def_motion(data):
- client = Openbox_findClient(openbox, data.window())
- if not client: return
-
- global posqueue
- if not posqueue[0][0] == 1: return
-
- type = data.target()
- if (type == Type_Titlebar) or (type == Type_Label) or \
- (type == Type_Plate) or (type == Type_Handle):
- def_do_move(data.xroot(), data.yroot(), client)
- elif type == Type_LeftGrip:
- def_do_resize(data.xroot(), data.yroot(), client,
- OBClient_TopRight)
- elif type == Type_RightGrip:
- def_do_resize(data.xroot(), data.yroot(), client,
- OBClient_TopLeft)
-
-def def_enter(data):
- client = Openbox_findClient(openbox, data.window())
- if not client: return
- if enter_focus != 0:
- OBClient_focus(client)
-
-def def_leave(data):
- client = Openbox_findClient(openbox, data.window())
- if not client: return
- if leave_unfocus != 0:
- OBClient_unfocus(client)
-
-
-register(Action_EnterWindow, def_enter)
-register(Action_LeaveWindow, def_leave)
-
-register(Action_ButtonPress, def_motion_press)
-register(Action_ButtonRelease, def_motion_release)
-register(Action_MouseMotion, def_motion)
-
-print "Loaded clientmotion.py"