From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:60250) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsJnn-0005V0-SF for qemu-devel@nongnu.org; Tue, 31 Jan 2012 14:55:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RsJnl-00040n-5q for qemu-devel@nongnu.org; Tue, 31 Jan 2012 14:55:39 -0500 Received: from moutng.kundenserver.de ([212.227.17.10]:56616) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsJnk-00040H-JR for qemu-devel@nongnu.org; Tue, 31 Jan 2012 14:55:37 -0500 Message-ID: <4F284741.6060305@rdsoftware.de> Date: Tue, 31 Jan 2012 20:55:45 +0100 From: Erik Rull MIME-Version: 1.0 References: <54777ea5bba70b1206c783763c49437dd0101d25.1328013930.git.jan.kiszka@siemens.com> In-Reply-To: <54777ea5bba70b1206c783763c49437dd0101d25.1328013930.git.jan.kiszka@siemens.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 5/5] sdl: Limit sdl_grab_end in handle_activation to Windows hosts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: qemu-devel 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 > Signed-off-by: Jan Kiszka > --- > 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