diff options
-rw-r--r-- | video/sdl_v.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/video/sdl_v.c b/video/sdl_v.c index d190237fb..a90333ae4 100644 --- a/video/sdl_v.c +++ b/video/sdl_v.c @@ -346,9 +346,11 @@ static int PollEvent(void) break; case SDL_ACTIVEEVENT: - if (ev.active.gain == 1) // mouse entered the window, enable cursor + if (!(ev.active.state & SDL_APPMOUSEFOCUS)) break; + + if (ev.active.gain) { // mouse entered the window, enable cursor _cursor.in_window = true; - else if (ev.active.gain == 0) { + } else { UndrawMouseCursor(); // mouse left the window, undraw cursor _cursor.in_window = false; } |