Skip to content
Snippets Groups Projects
Commit 8dfa3061 authored by Gerd Hoffmann's avatar Gerd Hoffmann
Browse files

sdl2: fix mouse grab

When qemu mouse mode changes from relative to absolute
we must turn off sdl relative mouse mode too.

Fixes: https://bugs.launchpad.net/qemu/+bug/1703795


Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
Message-Id: <20180202120803.11501-1-kraxel@redhat.com>
parent 2ab858c6
No related branches found
No related tags found
No related merge requests found
......@@ -249,6 +249,7 @@ static void sdl_mouse_mode_change(Notifier *notify, void *data)
if (qemu_input_is_absolute()) {
if (!absolute_enabled) {
absolute_enabled = 1;
SDL_SetRelativeMouseMode(SDL_FALSE);
absolute_mouse_grab(&sdl2_console[0]);
}
} else if (absolute_enabled) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment