src/video/quartz/SDL_QuartzWM.m
changeset 58 bd6b0a910a65
parent 47 45b1c4303f87
child 158 4382c38dfbee
equal deleted inserted replaced
57:ec550054db3b 58:bd6b0a910a65
   120 static void QZ_MoveWMCursor     (_THIS, int x, int y) { }
   120 static void QZ_MoveWMCursor     (_THIS, int x, int y) { }
   121 static void QZ_CheckMouseMode   (_THIS) { }
   121 static void QZ_CheckMouseMode   (_THIS) { }
   122 
   122 
   123 static void QZ_SetCaption    (_THIS, const char *title, const char *icon) {
   123 static void QZ_SetCaption    (_THIS, const char *title, const char *icon) {
   124 
   124 
   125     NSString *str = [ [ NSString alloc ] initWithCString:title ];
   125     if ( window != nil ) {
   126     if (window != nil)
   126         NSString *string;
   127         [ window setTitle:str ];
   127         if ( title != NULL ) {
   128 
   128             string = [ [ NSString alloc ] initWithCString:title ];
   129     [ windowTitle release ];
   129             [ window setTitle:string ];
   130     windowTitle = str;
   130             [ string release ];
       
   131         }
       
   132         if ( icon != NULL ) {
       
   133             string = [ [ NSString alloc ] initWithCString:icon ];
       
   134             [ window setMiniwindowTitle:string ];
       
   135             [ string release ];
       
   136         }
       
   137     }
   131 }
   138 }
   132 
   139 
   133 static void QZ_SetIcon       (_THIS, SDL_Surface *icon, Uint8 *mask) {
   140 static void QZ_SetIcon       (_THIS, SDL_Surface *icon, Uint8 *mask) {
   134 /* Convert icon/mask to NSImage, assign with NSWindow's setMiniwindowImage method */
   141 /* Convert icon/mask to NSImage, assign with NSWindow's setMiniwindowImage method */
   135 }
   142 }