From: Erik Rull <erik.rull@rdsoftware.de>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 5/5] sdl: Limit sdl_grab_end in handle_activation to Windows hosts
Date: Tue, 31 Jan 2012 20:55:45 +0100 [thread overview]
Message-ID: <4F284741.6060305@rdsoftware.de> (raw)
In-Reply-To: <54777ea5bba70b1206c783763c49437dd0101d25.1328013930.git.jan.kiszka@siemens.com>
Jan Kiszka wrote:
> There are scenarios on Linux with some SDL versions where
> handle_activation is continuous invoked with state = SDL_APPINPUTFOCUS
> and gain = 0 while we grabbed the input. This causes a ping-pong when we
> grab the input after an absolute mouse entered the window.
>
> As this sdl_grab_end was once introduced to work around a Windows-only
> issue (0294ffb9c8), limit it to that platform.
>
> CC: Erik Rull<erik.rull@rdsoftware.de>
> Signed-off-by: Jan Kiszka<jan.kiszka@siemens.com>
> ---
> ui/sdl.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/ui/sdl.c b/ui/sdl.c
> index 73e5839..6f8091c 100644
> --- a/ui/sdl.c
> +++ b/ui/sdl.c
> @@ -828,10 +828,14 @@ static void handle_mousebutton(DisplayState *ds, SDL_Event *ev)
>
> static void handle_activation(DisplayState *ds, SDL_Event *ev)
> {
> +#ifdef _WIN32
> + /* Disable grab if the window no longer has the focus
> + * (Windows-only workaround) */
> if (gui_grab&& ev->active.state == SDL_APPINPUTFOCUS&&
> !ev->active.gain&& !gui_fullscreen) {
> sdl_grab_end();
> }
> +#endif
> if (!gui_grab&& ev->active.gain&& is_graphic_console()&&
> (kbd_mouse_is_absolute() || absolute_enabled)) {
> absolute_mouse_grab();
Hi Jan,
thanks for your help.
When will the patches be applied to the qemu-git?
Best regards,
Erik
next prev parent reply other threads:[~2012-01-31 19:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-31 12:45 [Qemu-devel] [PATCH 0/5] sdl: various fixes Jan Kiszka
2012-01-31 12:45 ` [Qemu-devel] [PATCH 1/5] sdl: Do not grab mouse on mode switch while in background Jan Kiszka
2012-01-31 12:45 ` [Qemu-devel] [PATCH 2/5] sdl: Fix block prevention of SDL_WM_GrabInput Jan Kiszka
2012-01-31 12:45 ` [Qemu-devel] [PATCH 3/5] Revert "Handle SDL grabs failing (Mark McLoughlin)" Jan Kiszka
2012-01-31 12:45 ` [Qemu-devel] [PATCH 4/5] sdl: Grab input on end of non-absolute mouse click Jan Kiszka
2012-01-31 12:45 ` [Qemu-devel] [PATCH 5/5] sdl: Limit sdl_grab_end in handle_activation to Windows hosts Jan Kiszka
2012-01-31 19:55 ` Erik Rull [this message]
2012-02-01 22:12 ` [Qemu-devel] [PATCH 0/5] sdl: various fixes Anthony Liguori
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=4F284741.6060305@rdsoftware.de \
--to=erik.rull@rdsoftware.de \
--cc=jan.kiszka@siemens.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.