diff src/video/quartz/SDL_QuartzVideo.m @ 56:ce9cd2cf0d0d

Date: Sun, 10 Jun 2001 17:33:44 -0500 From: Darrell Walisser <dwaliss1@purdue.edu> Subject: Re: [SDL] Mac OS X Goodies For You Updates and fixes: -fixed erasing window when minmizing it (with some minor window redraw problems) -implemented close box to send SDLQuit event -fixed messed up alpha on 32bpp windows
author Sam Lantinga <slouken@lokigames.com>
date Mon, 11 Jun 2001 00:08:10 +0000
parents 45b1c4303f87
children bd6b0a910a65
line wrap: on
line diff
--- a/src/video/quartz/SDL_QuartzVideo.m	Sun Jun 10 19:31:57 2001 +0000
+++ b/src/video/quartz/SDL_QuartzVideo.m	Mon Jun 11 00:08:10 2001 +0000
@@ -355,7 +355,8 @@
     
     /* Manually create a window, avoids having a nib file resource */
     window = [ [ SDL_QuartzWindow alloc ] initWithContentRect:rect 
-        styleMask:(NSTitledWindowMask | NSMiniaturizableWindowMask)
+        styleMask:(NSTitledWindowMask | NSMiniaturizableWindowMask |
+                    NSClosableWindowMask)
         backing: //NSBackingStoreBuffered
             NSBackingStoreRetained
           defer:NO ];
@@ -368,10 +369,14 @@
     current->w  = width;
     current->h = height;
     
+    [ window setReleasedWhenClosed:YES ];
     [ window setTitle:windowTitle ];
     [ window setAcceptsMouseMovedEvents:YES ];
+    [ window setViewsNeedDisplay:NO ];
     [ window center ];
-        
+    [ window setDelegate:
+        [ [ [ SDL_QuartzWindowDelegate alloc ] init ] autorelease ] ];
+    
     /* For OpenGL, we set the content view to a NSOpenGLView */
     if ( flags & SDL_OPENGL ) {
     
@@ -447,7 +452,7 @@
                 SDL_SetError ("24bpp is not available");
                 return NULL;
             case 32:   /* (8)-8-8-8 ARGB */
-                amask = 0xFF000000;
+                amask = 0x00000000; /* per-pixel alpha needs to be fixed */
                 rmask = 0x00FF0000;
                 gmask = 0x0000FF00;
                 bmask = 0x000000FF;