sdl hide pointer when not in focus
PATCH 1/1 sdl hide pointer when not in focus
Hide the mouse pointer when the sdl window is not in focus and the mouse is in absolute mode.
Signed-off-by Stefano Stabellini <[email protected]>
---
sdl.c +6 -0
@@ -520,6 +520,12 @@ !ev->active.gain && !gui_fullscreen_initial_grab) {sdl_grab_end (); } +/* Send mouse pointer to oblivion on focus change */ +if ((ev->active.state ==SDL_APPINPUTFOCUS ) || + (ev->active.state ==SDL_APPMOUSEFOCUS )) { +if (ev->active.gain !=SDL_ENABLE &&kbd_mouse_is_absolute ()) +kbd_mouse_event (0x7FFF ,0x7FFF ,0 ,0 ); + }if (ev->active.state &SDL_APPACTIVE ) {if (ev->active.gain) {/* Back to default interval */