diff --git a/sdl.c b/sdl.c index 01d9617a32a7a6f84fbdcc401113ece01c9a5dda..ee809daa6eae0e56a51174b927f08f67cb884702 100644 --- a/sdl.c +++ b/sdl.c @@ -301,6 +301,11 @@ static void sdl_refresh(DisplayState *ds) } } break; + case SDL_ACTIVEEVENT: + if (gui_grab && (ev->active.gain & SDL_ACTIVEEVENTMASK) == 0) { + sdl_grab_end(); + } + break; default: break; }