pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] [pingus] push by address@hidden - Release mouse-grab when u


From: pingus
Subject: [Pingus-CVS] [pingus] push by address@hidden - Release mouse-grab when user presses Alt-Tab on 2011-10-09 14:34 GMT
Date: Sun, 09 Oct 2011 14:40:08 +0000

Revision: 303d7e241262
Author:   Ingo Ruhnke <address@hidden>
Date:     Sun Oct  9 07:34:37 2011
Log:      Release mouse-grab when user presses Alt-Tab

http://code.google.com/p/pingus/source/detail?r=303d7e241262

Modified:
 /src/pingus/global_event.cpp

=======================================
--- /src/pingus/global_event.cpp        Sun Oct  2 14:59:12 2011
+++ /src/pingus/global_event.cpp        Sun Oct  9 07:34:37 2011
@@ -48,6 +48,18 @@
       }
       break;

+ case SDLK_TAB: // unlock mouse grab if Alt-Tab is pressed to allow the user to change windows
+      if (config_manager.get_mouse_grab())
+      {
+        if (keystate[SDLK_LALT] || keystate[SDLK_RALT])
+        {
+          // FIXME: should suspend the grab till the user clicks the
+          // window again, not completely disable it
+          config_manager.set_mouse_grab(false);
+        }
+      }
+      break;
+
     case SDLK_F11:
       config_manager.set_fullscreen(!config_manager.get_fullscreen());
       break;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]