[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] qemu sdl.c
From: |
Fabrice Bellard |
Subject: |
[Qemu-devel] qemu sdl.c |
Date: |
Tue, 13 Jun 2006 12:03:53 +0000 |
CVSROOT: /sources/qemu
Module name: qemu
Changes by: Fabrice Bellard <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();