From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LNZ8g-0001hs-IL for qemu-devel@nongnu.org; Thu, 15 Jan 2009 15:48:30 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LNZ8e-0001gN-LN for qemu-devel@nongnu.org; Thu, 15 Jan 2009 15:48:30 -0500 Received: from [199.232.76.173] (port=34721 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LNZ8e-0001gH-FQ for qemu-devel@nongnu.org; Thu, 15 Jan 2009 15:48:28 -0500 Received: from qw-out-1920.google.com ([74.125.92.145]:7911) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LNZ8e-0001Nj-39 for qemu-devel@nongnu.org; Thu, 15 Jan 2009 15:48:28 -0500 Received: by qw-out-1920.google.com with SMTP id 5so286918qwc.4 for ; Thu, 15 Jan 2009 12:48:27 -0800 (PST) Message-ID: <496FA110.1050206@codemonkey.ws> Date: Thu, 15 Jan 2009 14:48:16 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Handle SDL grabs failing References: <1232017217-29545-1-git-send-email-markmc@redhat.com> In-Reply-To: <1232017217-29545-1-git-send-email-markmc@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Mark McLoughlin Mark McLoughlin wrote: > If a X window is not viewable, XGrabPointer() fails and > returns GrabNotViewable. SDL's X backend currently handles > this by retrying the grab until the window becomes viewable > again. > > This means e.g. if you Ctrl-Alt-RightArrow to switch > workspaces, QEMU tries to grab, SDL blocks because the > window isn't viewable and your guest stops executing until > you switch back to that workspace again. > > See this Fedora bug for the gory details: > > https://bugzilla.redhat.com/480065 > > Some SDL backends will return SDL_GRAB_OFF from > SDL_WM_GrabInput(), so the fix is to make the X backend do > this if the grab fails. > > The only side-effect in QEMU is that if SDL_WM_GrabInput() > fails we still change the window title to indicate that it's > grabbed, when in fact it's not. This patch fixes that minor > issue. > > Signed-off-by: Mark McLoughlin > Nice catch! This has been a long standing bug. Applied. Thanks. Regards, Anthony Liguori