diff src/video/quartz/SDL_QuartzWM.m @ 158:4382c38dfbee

Date: Tue, 21 Aug 2001 03:50:01 +0200 From: Max Horn <max@quendi.de> Subject: New patch for OS X Attached a .patch file for SDL/OSX with some nice bug fixes / enhancments. * fixes the activation issues, which also caused the window to be always drawn like an inactive. The close/minimize widgets now are animated properly, too. * the menu items are automatically adjusted to use the app name instead of just "SDL App". I did this so that we really can use one central SDLMain.nib file, w/o requiring developers to make a copy of it and adjust it. * libSDLMain now contains the proper cocoa code, not as before the carbon code. This means apps no longer have to carry a copy of SDLMain.m/SDLMain.h * revamped configure.in to properly build a Cocoa/Quartz SDL lib, not a Carbon based SDL lib
author Sam Lantinga <slouken@libsdl.org>
date Tue, 21 Aug 2001 07:19:59 +0000
parents bd6b0a910a65
children e92aa316c517
line wrap: on
line diff
--- a/src/video/quartz/SDL_QuartzWM.m	Mon Aug 20 04:41:49 2001 +0000
+++ b/src/video/quartz/SDL_QuartzWM.m	Tue Aug 21 07:19:59 2001 +0000
@@ -96,7 +96,7 @@
         /* Convert to absolute screen coordinates */
         NSPoint base, screen;
         base = NSMakePoint (p.x, p.y);
-        screen = [ window convertBaseToScreen:base ];
+        screen = [ qz_window convertBaseToScreen:base ];
         p.x = screen.x;
         p.y = device_height - screen.y;
         CGDisplayMoveCursorToPoint (display_id, p);
@@ -122,16 +122,16 @@
 
 static void QZ_SetCaption    (_THIS, const char *title, const char *icon) {
 
-    if ( window != nil ) {
+    if ( qz_window != nil ) {
         NSString *string;
         if ( title != NULL ) {
             string = [ [ NSString alloc ] initWithCString:title ];
-            [ window setTitle:string ];
+            [ qz_window setTitle:string ];
             [ string release ];
         }
         if ( icon != NULL ) {
             string = [ [ NSString alloc ] initWithCString:icon ];
-            [ window setMiniwindowTitle:string ];
+            [ qz_window setMiniwindowTitle:string ];
             [ string release ];
         }
     }
@@ -144,19 +144,19 @@
 static int  QZ_IconifyWindow (_THIS) { 
 
     /* Bug! minimize erases the framebuffer */
-    if ( ! [ window isMiniaturized ] ) {
-        [ window miniaturize:nil ];
+    if ( ! [ qz_window isMiniaturized ] ) {
+        [ qz_window miniaturize:nil ];
         return 1;
     }
     else {
-        SDL_SetError ("window already iconified");
+        SDL_SetError ("qz_window already iconified");
         return 0;
     }
 }
 
 /*
 static int  QZ_GetWMInfo  (_THIS, SDL_SysWMinfo *info) { 
-    info->nsWindowPtr = window;
+    info->nsWindowPtr = qz_window;
     return 0; 
 }*/