src/events/SDL_mouse.c
changeset 7097 84bbd421d62f
parent 7089 257fc4e541e1
child 7104 4e4ca313000c
--- a/src/events/SDL_mouse.c	Tue Apr 23 16:54:52 2013 -0300
+++ b/src/events/SDL_mouse.c	Tue Apr 23 18:47:32 2013 -0700
@@ -165,13 +165,11 @@
     }
 
     if (window != mouse->focus) {
-        mouse->last_x = x;
-        mouse->last_y = y;
-
 #ifdef DEBUG_MOUSE
-        printf("Mouse entered window, synthesizing focus gain event\n");
+         printf("Mouse entered window, synthesizing focus gain & move event\n");
 #endif
-        SDL_SetMouseFocus(window);
+         SDL_SetMouseFocus(window);
+         SDL_PrivateSendMouseMotion(window, mouse->mouseID, 0, x, y);
     }
     return SDL_TRUE;
 }
@@ -686,4 +684,4 @@
     return shown;
 }
 
-/* vi: set ts=4 sw=4 expandtab: */
\ No newline at end of file
+/* vi: set ts=4 sw=4 expandtab: */