comparison 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
comparison
equal deleted inserted replaced
630:550bccdf04bd 631:52864d66d168
581 if ( p.y >= winRect.size.height ) 581 if ( p.y >= winRect.size.height )
582 p.y = winRect.size.height-1; 582 p.y = winRect.size.height-1;
583 583
584 QZ_PrivateWarpCursor (this, p.x, p.y); 584 QZ_PrivateWarpCursor (this, p.x, p.y);
585 } 585 }
586 else
587 if ( !isInGameWin && (SDL_GetAppState() & SDL_APPMOUSEFOCUS) ) {
588
589 SDL_PrivateAppActive (0, SDL_APPMOUSEFOCUS);
590 }
591 else
592 if ( isInGameWin && !(SDL_GetAppState() & SDL_APPMOUSEFOCUS) ) {
593
594 SDL_PrivateAppActive (1, SDL_APPMOUSEFOCUS);
595 }
586 break; 596 break;
587 case NSScrollWheel: 597 case NSScrollWheel:
588 if ( isInGameWin ) { 598 if ( isInGameWin ) {
589 float dy; 599 float dy;
590 Uint8 button; 600 Uint8 button;