Commit 24952847 authored by Jindrich Makovicka's avatar Jindrich Makovicka Committed by Gerd Hoffmann
Browse files

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: default avatarJindrich Makovicka <makovick@gmail.com>
Message-Id: <20171112193032.9724-8-makovick@gmail.com>
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent cd6d78b7
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -471,7 +471,8 @@ 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 ||
        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);
        }