Fixes issue 18
Fixes issue 18


Index: pyglet/window/win32/__init__.py
===================================================================
--- pyglet/window/win32/__init__.py	(revision 423)
+++ pyglet/window/win32/__init__.py	(working copy)
@@ -590,11 +590,11 @@

     @Win32EventHandler(WM_MOUSELEAVE)
     def _event_mouseleave(self, msg, wParam, lParam):
-        x = point.x
-        y = self.height - point.y
         point = POINT()
         _user32.GetCursorPos(byref(point))
         _user32.ScreenToClient(self._hwnd, byref(point))
+        x = point.x
+        y = self.height - point.y
         self._tracking = False
         self.dispatch_event(EVENT_MOUSE_LEAVE, x, y)
         return 0

--HG--
extra : convert_revision : svn%3A14d46d22-621c-0410-bb3d-6f67920f7d95/trunk%40424

infowantstobeseen/pyglet-darwincore,infowantstobeseen/pyglet-darwincore,infowantstobeseen/pyglet-darwincore,infowantstobeseen/pyglet-darwincore,infowantstobeseen/pyglet-darwincore