From: Gerd Hoffmann <1703795@bugs.launchpad.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [Bug 1703795] [PATCH] sdl2: fix mouse grab
Date: Fri, 02 Feb 2018 12:08:03 -0000 [thread overview]
Message-ID: <20180202120803.11501-1-kraxel@redhat.com> (raw)
In-Reply-To: 149985188503.15456.11517595781983565935.malonedeb@wampee.canonical.com
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>
---
ui/sdl2.c | 1 +
1 file changed, 1 insertion(+)
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) {
--
2.9.3
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1703795
Title:
Unable to release mouse in SDL2 mode
Status in QEMU:
New
Bug description:
Starting with commit 8f4ea9cd0b770dbe496d9d24f0ef8813fdbfe0d0 "sdl:
prefer sdl2 over sdl1", I can no longer release mouse pointer grab
unless I use --with-sdlabi=1.2 configure option.
This easily reproduces in e.g. guest Kubuntu, when I let it start Xorg
and then click into the QEMU window. After this the mouse is trapped
and no matter how I combine Ctrl+Alt and motion of the cursor, the
pointer never goes out from the window. When at the border, QEMU
window switches from "Press Ctrl+Alt to exit grab" to "QEMU", i.e. it
thinks that it has released the grab. But it hasn't really, so I have
to go to VT1 and do "pkill qemu" from there to get my pointer back.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1703795/+subscriptions
next prev parent reply other threads:[~2018-02-02 16:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-12 9:31 [Qemu-devel] [Bug 1703795] [NEW] Unable to release mouse in SDL2 mode Ruslan
2017-07-20 12:52 ` [Qemu-devel] [Bug 1703795] " Thomas Huth
2017-07-20 13:03 ` Ruslan
2018-01-27 4:30 ` jmicco
2018-02-01 14:00 ` BALATON Zoltan
2018-02-01 16:00 ` BALATON Zoltan
2018-02-01 16:13 ` Daniel Berrange
2018-02-01 17:14 ` BALATON Zoltan
2018-02-02 12:07 ` Gerd Hoffmann
2018-02-02 23:27 ` BALATON Zoltan
2018-02-02 12:08 ` Gerd Hoffmann [this message]
2018-02-02 19:28 ` Ruslan
2018-04-26 6:07 ` Thomas Huth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180202120803.11501-1-kraxel@redhat.com \
--to=1703795@bugs.launchpad.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).