From 9a9aa5703a97926e95c0431687cc2d8663cb21a3 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 16 Feb 2004 21:06:10 +0000 Subject: [PATCH] Date: Mon, 16 Feb 2004 19:21:51 +0100 From: Max Horn Subject: Re: Fix for OSX bug The problem is that our actual client area is realized as a subview of the "content view" of the window. That's normal so far. The odd part is that, while our subview starts out filling it parent 100%, upon resizes it gets changed to something smaller.... Anyway, here is a revised patch which simply enforces the size of window_view by calling setFrameSize. --- src/video/quartz/SDL_QuartzVideo.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/video/quartz/SDL_QuartzVideo.m b/src/video/quartz/SDL_QuartzVideo.m index aa5de4331..caa618c24 100644 --- a/src/video/quartz/SDL_QuartzVideo.m +++ b/src/video/quartz/SDL_QuartzVideo.m @@ -759,6 +759,7 @@ other blitting while waiting on the VBL (and hence results in higher framerates) if (!isCustom) { [ qz_window setContentSize:contentRect.size ]; current->flags |= (SDL_NOFRAME|SDL_RESIZABLE) & mode_flags; + [ window_view setFrameSize:contentRect.size ]; } } @@ -770,7 +771,7 @@ other blitting while waiting on the VBL (and hence results in higher framerates) } window_view = [ [ NSView alloc ] initWithFrame:contentRect ]; - [ window_view setAutoresizingMask: NSViewMinYMargin ]; + [ window_view setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable ]; [ [ qz_window contentView ] addSubview:window_view ]; [ gl_context setView: window_view ]; [ window_view release ]; @@ -785,7 +786,7 @@ other blitting while waiting on the VBL (and hence results in higher framerates) if (window_view == nil) { window_view = [ [ NSQuickDrawView alloc ] initWithFrame:contentRect ]; - [ window_view setAutoresizingMask: NSViewMinYMargin ]; + [ window_view setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable ]; [ [ qz_window contentView ] addSubview:window_view ]; [ window_view release ]; [ qz_window makeKeyAndOrderFront:nil ];