diff options
author | Jindrich Makovicka <makovick@gmail.com> | 2017-11-12 20:30:31 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2017-11-16 09:57:47 +0100 |
commit | 24952847ad50f1b120287fdc4469b78108eef33c (patch) | |
tree | 3f6ad64fdb93bef447d45d63bf65e01cf54cbbf9 /ui | |
parent | cd6d78b71843df2cb0a7228b935cfb9833b65c65 (diff) |
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 <makovick@gmail.com>
Message-Id: <20171112193032.9724-8-makovick@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/sdl2.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 && |