src/video/quartz/SDL_QuartzVideo.m
changeset 832 f003714db2f4
parent 823 d67e76f25874
child 852 2651b6b43840
equal deleted inserted replaced
831:26fe9256c48b 832:f003714db2f4
   757     else {
   757     else {
   758     
   758     
   759         if (!isCustom) {
   759         if (!isCustom) {
   760             [ qz_window setContentSize:contentRect.size ];
   760             [ qz_window setContentSize:contentRect.size ];
   761             current->flags |= (SDL_NOFRAME|SDL_RESIZABLE) & mode_flags;
   761             current->flags |= (SDL_NOFRAME|SDL_RESIZABLE) & mode_flags;
       
   762             [ window_view setFrameSize:contentRect.size ];
   762         }
   763         }
   763     }
   764     }
   764 
   765 
   765     /* For OpenGL, we bind the context to a subview */
   766     /* For OpenGL, we bind the context to a subview */
   766     if ( flags & SDL_OPENGL ) {
   767     if ( flags & SDL_OPENGL ) {
   768         if ( ! QZ_SetupOpenGL (this, bpp, flags) ) {
   769         if ( ! QZ_SetupOpenGL (this, bpp, flags) ) {
   769             return NULL;
   770             return NULL;
   770         }
   771         }
   771 
   772 
   772         window_view = [ [ NSView alloc ] initWithFrame:contentRect ];
   773         window_view = [ [ NSView alloc ] initWithFrame:contentRect ];
   773         [ window_view setAutoresizingMask: NSViewMinYMargin ];
   774         [ window_view setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable ];
   774         [ [ qz_window contentView ] addSubview:window_view ];
   775         [ [ qz_window contentView ] addSubview:window_view ];
   775         [ gl_context setView: window_view ];
   776         [ gl_context setView: window_view ];
   776         [ window_view release ];
   777         [ window_view release ];
   777         [ gl_context makeCurrentContext];
   778         [ gl_context makeCurrentContext];
   778         [ qz_window makeKeyAndOrderFront:nil ];
   779         [ qz_window makeKeyAndOrderFront:nil ];
   783 
   784 
   784         /* Only recreate the view if it doesn't already exist */
   785         /* Only recreate the view if it doesn't already exist */
   785         if (window_view == nil) {
   786         if (window_view == nil) {
   786         
   787         
   787             window_view = [ [ NSQuickDrawView alloc ] initWithFrame:contentRect ];
   788             window_view = [ [ NSQuickDrawView alloc ] initWithFrame:contentRect ];
   788             [ window_view setAutoresizingMask: NSViewMinYMargin ];
   789             [ window_view setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable ];
   789             [ [ qz_window contentView ] addSubview:window_view ];
   790             [ [ qz_window contentView ] addSubview:window_view ];
   790             [ window_view release ];
   791             [ window_view release ];
   791             [ qz_window makeKeyAndOrderFront:nil ];
   792             [ qz_window makeKeyAndOrderFront:nil ];
   792         }
   793         }
   793         
   794