qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] QEMU 0.9.0 patch
@ 2007-03-26 21:02 Kyle Hubert
  0 siblings, 0 replies; only message in thread
From: Kyle Hubert @ 2007-03-26 21:02 UTC (permalink / raw)
  To: qemu-devel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-03-26 21:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-26 21:02 [Qemu-devel] QEMU 0.9.0 patch Kyle Hubert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).