From 63fd81dc12159a8621cca5004558ae7dac2c9395 Mon Sep 17 00:00:00 2001
From: pin <pin@fe552daf-6dbe-4428-90eb-1537e0879342>
Date: Mon, 6 Sep 2010 11:32:59 +0000
Subject: [PATCH] =?utf8?q?Bugfix=20:=20sous=20Windows,=20l'attribut=20"rel?=
 =?utf8?q?"=20d'un=20=C3=A9v=C3=A9nement=20MOUSEMOTION=20continue=20=C3=A0?=
 =?utf8?q?=20croitre=20quand=20le=20pointeur=20a=20atteint=20le=20bord=20d?=
 =?utf8?q?e=20l'=C3=A9cran=E2=80=A6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit

git-svn-id: https://svn.cri.ensmp.fr/svn/minwii/trunk@312 fe552daf-6dbe-4428-90eb-1537e0879342
---
 src/minwii/widgets/cursors.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/minwii/widgets/cursors.py b/src/minwii/widgets/cursors.py
index ad8f383..f7940fd 100755
--- a/src/minwii/widgets/cursors.py
+++ b/src/minwii/widgets/cursors.py
@@ -103,7 +103,9 @@ class WarpingCursor(pygame.sprite.DirtySprite, EventHandlerMixin):
     @event_handler(pygame.MOUSEMOTION)
     def move(self, event) :
         self.dirty = 1
-        self.rect.move_ip(event.rel)
+        x, y = pygame.mouse.get_pos()
+        rel = (x - self.rect.centerx, y - self.rect.centery)
+        self.rect.move_ip(rel)
     
     def setPosition(self, pos) :
         self.dirty = 1
-- 
2.20.1