changeset 15882:77aa290c726a

fix fullscreen menubar item behaviour
author nplourde
date Fri, 01 Jul 2005 17:24:31 +0000
parents ab6d02448e57
children b656bb4945cc
files libvo/vo_macosx.m
diffstat 1 files changed, 28 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_macosx.m	Fri Jul 01 17:21:13 2005 +0000
+++ b/libvo/vo_macosx.m	Fri Jul 01 17:24:31 2005 +0000
@@ -491,19 +491,35 @@
 	if(sender == kAspectFullCmd)
 	{
 		movie_aspect = 4.0f/3.0f;
-		frame.size.width = d_width*winSizeMult;
-		frame.size.height = (d_width/movie_aspect)*winSizeMult;
-		[window setContentSize: frame.size];
-		[self reshape];
+		
+		if(isFullscreen)
+		{
+			[self reshape];
+		}
+		else
+		{
+			frame.size.width = d_width*winSizeMult;
+			frame.size.height = (d_width/movie_aspect)*winSizeMult;
+			[window setContentSize: frame.size];
+			[self reshape];
+		}
 	}
 		
 	if(sender == kAspectWideCmd)
 	{
 		movie_aspect = 16.0f/9.0f;
-		frame.size.width = d_width*winSizeMult;
-		frame.size.height = (d_width/movie_aspect)*winSizeMult;
-		[window setContentSize: frame.size];
-		[self reshape];
+
+		if(isFullscreen)
+		{
+			[self reshape];
+		}
+		else
+		{
+			frame.size.width = d_width*winSizeMult;
+			frame.size.height = (d_width/movie_aspect)*winSizeMult;
+			[window setContentSize: frame.size];
+			[self reshape];
+		}
 	}
 }
 
@@ -621,7 +637,6 @@
 	
 		if( ((curTime - lastTime) >= 5) || (lastTime == 0) )
 		{
-			HideMenuBar();
 			HideCursor();
 			mouseHide = YES;
 			lastTime = curTime;
@@ -671,8 +686,7 @@
 	{
 		if(!isRootwin)
 		{
-			//hide menubar and mouse if fullscreen on main display
-			HideMenuBar();
+			SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
 			HideCursor();
 			mouseHide = YES;
 		}
@@ -690,9 +704,10 @@
 		isFullscreen = 1;
 	}
 	else
-	{
+	{	
+		SetSystemUIMode( kUIModeNormal, NULL);
+		
 		isFullscreen = 0;
-		ShowMenuBar();
 		ShowCursor();
 		mouseHide = NO;
 
@@ -851,7 +866,6 @@
 {
 	if(isFullscreen && !isRootwin)
 	{
-		ShowMenuBar();
 		ShowCursor();
 		mouseHide = NO;
 	}