All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabrice Bellard <fabrice@bellard.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] qemu sdl.c
Date: Tue, 13 Jun 2006 12:03:53 +0000	[thread overview]
Message-ID: <E1Fq7cf-0002Vv-Sx@savannah.gnu.org> (raw)

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();

             reply	other threads:[~2006-06-13 12:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-13 12:03 Fabrice Bellard [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-03-13 19:20 [Qemu-devel] qemu sdl.c Aurelien Jarno
2007-06-21 17:56 Andrzej Zaborowski
2006-08-17 10:42 Fabrice Bellard
2006-06-13 10:49 Fabrice Bellard
2006-03-11 20:07 Paul Brook
2005-10-30 23:19 Fabrice Bellard
2005-07-23 17:54 Fabrice Bellard
2005-01-17 22:32 Fabrice Bellard
2004-11-14 19:52 Fabrice Bellard
2003-09-30 21:09 Fabrice Bellard
2003-08-09 18:26 Fabrice Bellard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1Fq7cf-0002Vv-Sx@savannah.gnu.org \
    --to=fabrice@bellard.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.