Index: src/video/cocoa_v.mm =================================================================== --- src/video/cocoa_v.mm (Revision 10404) +++ src/video/cocoa_v.mm (Arbeitskopie) @@ -1131,6 +1134,7 @@ static const char* QZ_SetVideoWindowed(uint width, uint height) { + int titleBarHeight = 22; // Height of title bar of window char caption[50]; NSString *nsscaption; unsigned int style; @@ -1184,10 +1188,17 @@ /* We already have a window, just change its size */ if (!isCustom) { [ _cocoa_video_data.window setContentSize:contentRect.size ]; + // Ensure frame height - title bar height >= view height + contentRect.size.height = clamp(height, 0, [ _cocoa_video_data.window frame ].size.height - titleBarHeight); + height = contentRect.size.height; [ _cocoa_video_data.qdview setFrameSize:contentRect.size ]; } } + // Update again + _cocoa_video_data.width = width; + _cocoa_video_data.height = height; + [ _cocoa_video_data.window center ]; /* Only recreate the view if it doesn't already exist */