[MPlayer-cvslog] CVS: main/libvo vo_macosx.m,1.32,1.33

Nicolas Plourde CVS syncmail at mplayerhq.hu
Wed Jan 11 03:45:20 CET 2006


CVS change done by Nicolas Plourde CVS

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

Modified Files:
	vo_macosx.m 
Log Message:
do not give focus to vo_macosx in shared buffer mode. Patch by Hector Chu<hectorchu at gmail.com>

Index: vo_macosx.m
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_macosx.m,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- vo_macosx.m	4 Sep 2005 12:58:16 -0000	1.32
+++ vo_macosx.m	11 Jan 2006 02:45:17 -0000	1.33
@@ -257,26 +257,6 @@
 static int preinit(const char *arg)
 {
 	int parse_err = 0;
-	
-	#if !defined (MACOSX_FINDER_SUPPORT) || !defined (HAVE_SDL)
-	//this chunk of code is heavily based off SDL_macosx.m from SDL 
-	//it uses an Apple private function to request foreground operation
-	void CPSEnableForegroundOperation(ProcessSerialNumber* psn);
-	ProcessSerialNumber myProc, frProc;
-	Boolean sameProc;
-	
-	if (GetFrontProcess(&frProc) == noErr)
-	{
-		if (GetCurrentProcess(&myProc) == noErr)
-		{
-			if (SameProcess(&frProc, &myProc, &sameProc) == noErr && !sameProc)
-			{
-				CPSEnableForegroundOperation(&myProc);
-			}
-			SetFrontProcess(&myProc);
-		}
-	}
-	#endif
 
     if(arg) 
     {
@@ -305,6 +285,26 @@
 	
 	if(!shared_buffer)
 	{
+		#if !defined (MACOSX_FINDER_SUPPORT) || !defined (HAVE_SDL)
+		//this chunk of code is heavily based off SDL_macosx.m from SDL 
+		//it uses an Apple private function to request foreground operation
+		void CPSEnableForegroundOperation(ProcessSerialNumber* psn);
+		ProcessSerialNumber myProc, frProc;
+		Boolean sameProc;
+
+		if (GetFrontProcess(&frProc) == noErr)
+		{
+			if (GetCurrentProcess(&myProc) == noErr)
+			{
+				if (SameProcess(&frProc, &myProc, &sameProc) == noErr && !sameProc)
+				{
+					CPSEnableForegroundOperation(&myProc);
+				}
+				SetFrontProcess(&myProc);
+			}
+		}
+		#endif
+
 		if(!mpGLView)
 		{
 			mpGLView = [[MPlayerOpenGLView alloc] initWithFrame:NSMakeRect(0, 0, 100, 100) pixelFormat:[MPlayerOpenGLView defaultPixelFormat]];




More information about the MPlayer-cvslog mailing list