From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fq7ck-0007XN-H4 for qemu-devel@nongnu.org; Tue, 13 Jun 2006 08:03:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fq7ci-0007VO-6r for qemu-devel@nongnu.org; Tue, 13 Jun 2006 08:03:58 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fq7ch-0007UZ-K2 for qemu-devel@nongnu.org; Tue, 13 Jun 2006 08:03:55 -0400 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fq7ld-0004Kk-Mh for qemu-devel@nongnu.org; Tue, 13 Jun 2006 08:13:09 -0400 Received: from savannah.gnu.org ([127.0.0.1]) by savannah.gnu.org with esmtp (Exim 3.36 #1 (Debian)) id 1Fq7cg-0002Vy-00 for ; Tue, 13 Jun 2006 08:03:54 -0400 Received: from bellard by savannah.gnu.org with local (Exim 4.50) id 1Fq7cf-0002Vv-Sx for qemu-devel@nongnu.org; Tue, 13 Jun 2006 12:03:54 +0000 Message-Id: From: Fabrice Bellard Date: Tue, 13 Jun 2006 12:03:53 +0000 Subject: [Qemu-devel] qemu sdl.c 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 CVSROOT: /sources/qemu Module name: qemu Changes by: Fabrice Bellard 06/06/13 12:03:53 Modified files: . : sdl.c Log message: avoid stopping QEMU when switching desktops with Ctrl-Alt-x CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/sdl.c?cvsroot=qemu&r1=1.28&r2=1.29 Patches: Index: sdl.c =================================================================== RCS file: /sources/qemu/qemu/sdl.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -b -r1.28 -r1.29 --- sdl.c 13 Jun 2006 10:49:12 -0000 1.28 +++ sdl.c 13 Jun 2006 12:03:53 -0000 1.29 @@ -447,10 +447,18 @@ gui_key_modifier_pressed = 0; if (gui_keysym == 0) { /* exit/enter grab if pressing Ctrl-Alt */ - if (!gui_grab) + 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 + } else { sdl_grab_end(); + } /* SDL does not send back all the modifiers key, so we must correct it */ reset_keys();