video/cocoa_v.m
branch0.5
changeset 5530 15f701e93291
parent 5455 547cba149cbd
--- a/video/cocoa_v.m	Fri Aug 10 17:49:29 2007 +0000
+++ b/video/cocoa_v.m	Fri Aug 10 17:53:12 2007 +0000
@@ -1154,10 +1154,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 - 22 /* 22 is the height of title bar of window*/);
+			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 */