[Mplayer-cvslog] CVS: main/libvo vo_quartz.c,1.29,1.30

Nicolas Plourde CVS syncmail at mplayerhq.hu
Wed Oct 27 23:20:13 CEST 2004


CVS change done by Nicolas Plourde CVS

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

Modified Files:
	vo_quartz.c 
Log Message:
fix windows resizing ui glitch

Index: vo_quartz.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_quartz.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- vo_quartz.c	22 Oct 2004 00:28:03 -0000	1.29
+++ vo_quartz.c	27 Oct 2004 21:20:11 -0000	1.30
@@ -10,7 +10,7 @@
 	MPlayer Mac OSX Quartz video out module.
 	
 	todo:	-screen overlay output
-			-Enable live resize
+			-Add sub-option to select fullscreen resolution
 			-RGB32 lost HW accel in fullscreen
 			-(add sugestion here)
  */
@@ -534,6 +534,7 @@
 	windowAttrs =   kWindowStandardDocumentAttributes
 					| kWindowStandardHandlerAttribute
 					| kWindowMetalAttribute
+					| kWindowCompositingAttribute
 					| kWindowLiveResizeAttribute;
 					
  	if (theWindow == NULL)
@@ -555,6 +556,9 @@
 		SizeWindow (theWindow, d_width, d_height, 1);
  	}
 	
+	//Show window
+	RepositionWindow(theWindow, NULL, kWindowCascadeOnMainScreen);
+	ShowWindow (theWindow);
 	SetPort(GetWindowPort(theWindow));
 	
 	switch (image_format) 
@@ -717,10 +721,6 @@
 		}
 		break;
 	}
-
-	//Show window
-	RepositionWindow(theWindow, NULL, kWindowCascadeOnMainScreen);
-	ShowWindow (theWindow);
 	
 	if(vo_fs)
 		window_fullscreen();
@@ -1071,6 +1071,7 @@
 	uint32_t d_height;
 	
 	Rect tmpRect;
+	CGRect tmpBounds;
 
 	GetPortBounds( GetWindowPort(theWindow), &winRect );
 
@@ -1091,17 +1092,16 @@
 	}
 
 	//Clear Background
+	tmpBounds = CGRectMake( 0, border, winRect.right, winRect.bottom);
 	CreateCGContextForPort(GetWindowPort(theWindow),&context);
-	CGRect winBounds = CGRectMake( 0, border, winRect.right, winRect.bottom);
 	CGContextSetRGBFillColor(context, 0.0, 0.0, 0.0, 1.0);
-	CGContextFillRect(context, winBounds);
-	CGContextFlush(context);
+	CGContextFillRect(context, tmpBounds);
 	
 	switch (image_format)
 	{
 		case IMGFMT_RGB32:
 		{
-			bounds = CGRectMake(dstRect.left, dstRect.top, dstRect.right-dstRect.left, dstRect.bottom-dstRect.top);
+			bounds = CGRectMake(dstRect.left, dstRect.top+border, dstRect.right-dstRect.left, dstRect.bottom-dstRect.top);
 			CreateCGContextForPort (GetWindowPort (theWindow), &context);
 			break;
 		}
@@ -1197,5 +1197,4 @@
  		vo_quartz_fs = 0;
 	}
 	
-	window_resized();
 }




More information about the MPlayer-cvslog mailing list