aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2018-02-02 13:08:03 +0100
committerGerd Hoffmann <kraxel@redhat.com>2018-02-16 12:32:35 +0100
commit8dfa3061ce56d871dc9df1e264f05e7ec2fb50c1 (patch)
treebf5b9e2e3957bfe72cc825ecdb25dacfcdde9c8e /ui
parent2ab858c6c38ee152299445f2810dbd4c3a0ac7ee (diff)
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: Gerd Hoffmann <kraxel@redhat.com> Message-Id: <20180202120803.11501-1-kraxel@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/sdl2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/sdl2.c b/ui/sdl2.c
index 812c315891..858e04d7c0 100644
--- a/ui/sdl2.c
+++ b/ui/sdl2.c
@@ -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) {