From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HVwMw-0000Yk-7j for qemu-devel@nongnu.org; Mon, 26 Mar 2007 17:04:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HVwMu-0000Xu-Oe for qemu-devel@nongnu.org; Mon, 26 Mar 2007 17:04:45 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HVwMu-0000Xp-Id for qemu-devel@nongnu.org; Mon, 26 Mar 2007 16:04:44 -0500 Received: from wx-out-0506.google.com ([66.249.82.230]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HVwKc-0003GO-Ds for qemu-devel@nongnu.org; Mon, 26 Mar 2007 17:02:22 -0400 Received: by wx-out-0506.google.com with SMTP id i30so3364021wxd for ; Mon, 26 Mar 2007 14:02:21 -0700 (PDT) Message-ID: <9a158e2e0703261402k44392f0btadfa63badbf47a88@mail.gmail.com> Date: Mon, 26 Mar 2007 14:02:21 -0700 From: "Kyle Hubert" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: [Qemu-devel] QEMU 0.9.0 patch 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 I don't have the current source repository, I'm running off of the 0.9.0 source release. However, I felt that there was a bug with having the VM in fullscreen mode and still allowing the ctrl-alt modifiers to release the mouse. With SDL, this is rather useless and only requires the user to grab the mouse again. I'm not positive, but I believe there may be a bug if you switch the grab mode in fullscreen and exit fullscreen, then you don't fall back into your previous state. Everything appears to work with the following patch. Is it possible to get this submitted? -Kyle --- sdl.c.orig 2007-02-05 15:01:54.000000000 -0800 +++ sdl.c 2007-03-26 13:51:24.000000000 -0700 @@ -393,18 +393,20 @@ static void sdl_refresh(DisplayState *ds gui_key_modifier_pressed = 0; if (gui_keysym == 0) { /* exit/enter grab if pressing Ctrl-Alt */ - if (!gui_grab) { - /* if the application is not active, - do not try to enter grab state. It - prevents - 'SDL_WM_GrabInput(SDL_GRAB_ON)' - from blocking all the application - (SDL bug). */ - if (SDL_GetAppState() & SDL_APPACTIVE) - sdl_grab_start(); - } else { - sdl_grab_end(); - } + if (!gui_fullscreen) { + if (!gui_grab) { + /* if the application is not active, + do not try to enter grab state. It + prevents + 'SDL_WM_GrabInput(SDL_GRAB_ON)' + from blocking all the application + (SDL bug). */ + if (SDL_GetAppState() & SDL_APPACTIVE) + sdl_grab_start(); + } else { + sdl_grab_end(); + } + } /* SDL does not send back all the modifiers key, so we must correct it */ reset_keys();