USB tablet auto grab and ungrab
PATCH 1/1 USB tablet auto grab and ungrab
With this patch, automatic grab keyboard and mouse when the mouse enters the window, and ungrab when the mouse reachs the window edge.
I created this beacuse I want to close a window with ALT+F4 inside qemu, but I closed qemu window, because qemu is not grabbed.
Scipio
sdl.c +5 -0
@@ -330,6 +330,11 @@ }SDL_GetMouseState (&dx, &dy); +if ( dx==0 || dx==width-1 || dy==0 || dy==height-1 ) { +if (gui_grab)sdl_grab_end (); + }else { +if (!gui_grab)sdl_grab_start (); + } dx = dx *0x7FFF / width; dy = dy *0x7FFF / height; }