# HG changeset patch # User nplourde # Date 1136947517 0 # Node ID 22ec2e9cb530d7eab81d107a788172f0d6736828 # Parent 149298a8ff7834bd541444c4ccf01261e633e9ae do not give focus to vo_macosx in shared buffer mode. Patch by Hector Chu diff -r 149298a8ff78 -r 22ec2e9cb530 libvo/vo_macosx.m --- 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]];