Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pysamples/push_mouse_event.py
diff options
context:
space:
mode:
Diffstat (limited to 'pysamples/push_mouse_event.py')
-rw-r--r--pysamples/push_mouse_event.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pysamples/push_mouse_event.py b/pysamples/push_mouse_event.py
index a79f53e..485061f 100644
--- a/pysamples/push_mouse_event.py
+++ b/pysamples/push_mouse_event.py
@@ -32,8 +32,8 @@ def myblock(lc, x):
if lc.tw.mouse_flag == 1:
# push y first so x will be popped first
- lc.heap.append(lc.tw.mouse_y)
- lc.heap.append(lc.tw.mouse_x)
+ lc.heap.append((lc.tw.canvas.height / 2) - lc.tw.mouse_y)
+ lc.heap.append(lc.tw.mouse_x - (lc.tw.canvas.width / 2))
lc.heap.append(1) # mouse event
lc.tw.mouse_flag = 0
else: