From: Jindrich Makovicka Date: Sun, 12 Nov 2017 19:30:31 +0000 (+0100) Subject: sdl2: Do not leave grab when fullscreen X-Git-Tag: v2.11.0-rc2~18^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=24952847ad50f1b120287fdc4469b78108eef33c;p=thirdparty%2Fqemu.git sdl2: Do not leave grab when fullscreen Prevents displaying of a doubled mouse pointer when moving the pointer to the screen edges when fullscreen. Signed-off-by: Jindrich Makovicka Message-Id: <20171112193032.9724-8-makovick@gmail.com> Signed-off-by: Gerd Hoffmann --- diff --git a/ui/sdl2.c b/ui/sdl2.c index cf05214f974..83600540949 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -471,8 +471,9 @@ static void handle_mousemotion(SDL_Event *ev) SDL_GetWindowSize(scon->real_window, &scr_w, &scr_h); max_x = scr_w - 1; max_y = scr_h - 1; - if (gui_grab && (ev->motion.x == 0 || ev->motion.y == 0 || - ev->motion.x == max_x || ev->motion.y == max_y)) { + if (gui_grab && !gui_fullscreen + && (ev->motion.x == 0 || ev->motion.y == 0 || + ev->motion.x == max_x || ev->motion.y == max_y)) { sdl_grab_end(scon); } if (!gui_grab &&