changeset 17358:22ec2e9cb530

do not give focus to vo_macosx in shared buffer mode. Patch by Hector Chu<hectorchu@gmail.com>
author nplourde
date Wed, 11 Jan 2006 02:45:17 +0000
parents 149298a8ff78
children 2e4a4dfc5d49
files libvo/vo_macosx.m
diffstat 1 files changed, 20 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_macosx.m	Tue Jan 10 22:17:16 2006 +0000
+++ b/libvo/vo_macosx.m	Wed Jan 11 02:45:17 2006 +0000
@@ -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]];