[Mplayer-cvslog] CVS: main/libvo vo_quartz.c,1.37,1.38

Nicolas Plourde CVS syncmail at mplayerhq.hu
Sat Oct 30 21:56:44 CEST 2004


CVS change done by Nicolas Plourde CVS

Update of /cvsroot/mplayer/main/libvo
In directory mail:/var2/tmp/cvs-serv20565/libvo

Modified Files:
	vo_quartz.c 
Log Message:
window now save is old position when going in fullscreen or while using resize preset

Index: vo_quartz.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_quartz.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- vo_quartz.c	29 Oct 2004 02:16:16 -0000	1.37
+++ vo_quartz.c	30 Oct 2004 19:56:41 -0000	1.38
@@ -10,7 +10,8 @@
 	MPlayer Mac OSX Quartz video out module.
 	
 	todo:	-screen overlay output
-			-Add sub-option to select fullscreen resolution
+			-clear window background after live resize
+			-fit osd in black bar when available
 			-RGB32 lost HW accel in fullscreen
 			-(add sugestion here)
  */
@@ -350,7 +351,6 @@
 					}
 						
 					SizeWindow(theWindow, (d_width/2), ((d_width/movie_aspect)/2)+border, 1);
-					RepositionWindow(theWindow, NULL, kWindowCascadeOnMainScreen);
 					window_resized();
 				break;
 
@@ -361,7 +361,6 @@
 					}
 						
 					SizeWindow(theWindow, d_width, (d_width/movie_aspect)+border, 1);
-					RepositionWindow(theWindow, NULL, kWindowCascadeOnMainScreen);
 					window_resized();
 				break;
 
@@ -372,7 +371,6 @@
 					}
 						
 					SizeWindow(theWindow, (d_width*2), ((d_width/movie_aspect)*2)+border, 1);
-					RepositionWindow(theWindow, NULL, kWindowCascadeOnMainScreen);
 					window_resized();
 				break;
 
@@ -628,9 +626,8 @@
  	}
 	
 	//Show window
-	RepositionWindow(theWindow, NULL, kWindowCascadeOnMainScreen);
+	RepositionWindow(theWindow, NULL, kWindowCenterOnMainScreen);
 	ShowWindow (theWindow);
-	SetPort(GetWindowPort(theWindow));
 	
 	switch (image_format) 
 	{
@@ -1190,8 +1187,7 @@
 	//Clear Background
 	tmpBounds = CGRectMake( 0, border, winRect.right, winRect.bottom);
 	CreateCGContextForPort(GetWindowPort(theWindow),&context);
-	CGContextSetRGBFillColor(context, 0.0, 0.0, 0.0, 1.0);
-	CGContextFillRect(context, tmpBounds);
+	CGContextClearRect(context, tmpBounds);
 	
 	switch (image_format)
 	{
@@ -1262,6 +1258,7 @@
 	static Ptr restoreState = NULL;
 	RGBColor black={0,0,0};
 	GDHandle deviceHdl;
+	static Rect oldWinBounds;
 
 	//go fullscreen
 	if(vo_fs)
@@ -1286,7 +1283,10 @@
 
 		//save old window size
  		if (!vo_quartz_fs)
+		{
 			GetWindowPortBounds(theWindow, &oldWinRect);
+			GetWindowBounds(theWindow, kWindowContentRgn, &oldWinBounds);
+		}
 		
 		//go fullscreen
 		border = 0;
@@ -1319,7 +1319,7 @@
 		border = 20;
 		ChangeWindowAttributes(theWindow, kWindowResizableAttribute, 0);
 		SizeWindow(theWindow, oldWinRect.right, oldWinRect.bottom,1);
-		RepositionWindow(theWindow, NULL, kWindowCascadeOnMainScreen);
+		MoveWindow(theWindow, oldWinBounds.left, oldWinBounds.top, 1);
 
  		vo_quartz_fs = 0;
 	}




More information about the MPlayer-cvslog mailing list