diff src/video/quartz/SDL_QuartzEvents.m @ 631:52864d66d168

Date: Mon, 5 May 2003 00:08:51 -0400 From: Darrell Walisser Subject: SDL Active Events Patch Hi Guys, I was reading sdl-devel the other day and remembered we don't handle SDL_APPACTIVE and SDL_APPMOUSEFOCUS. I hacked together a quick patch to do just this. One thing to note - there are actually two ways to "iconify" the SDL window (which sets SDL_APPACTIVE): hiding the entire application (for example, option-click on some other window) and minimizing the window to the dock. I treat both as SDL_APPACTIVE, since the window is no longer visible. Cheers, Darrell
author Sam Lantinga <slouken@libsdl.org>
date Thu, 29 May 2003 04:52:36 +0000
parents fb78cadbfeb8
children abfdc08eb289
line wrap: on
line diff
--- a/src/video/quartz/SDL_QuartzEvents.m	Thu May 29 04:44:13 2003 +0000
+++ b/src/video/quartz/SDL_QuartzEvents.m	Thu May 29 04:52:36 2003 +0000
@@ -583,6 +583,16 @@
                         
                         QZ_PrivateWarpCursor (this, p.x, p.y);
                     }
+                    else
+                    if ( !isInGameWin && (SDL_GetAppState() & SDL_APPMOUSEFOCUS) ) {
+                    
+                        SDL_PrivateAppActive (0, SDL_APPMOUSEFOCUS);
+                    }
+                    else
+                    if ( isInGameWin && !(SDL_GetAppState() & SDL_APPMOUSEFOCUS) ) {
+                    
+                        SDL_PrivateAppActive (1, SDL_APPMOUSEFOCUS);
+                    }
                     break;
                 case NSScrollWheel:
                     if ( isInGameWin ) {