From 74a12366c163d43cb4900806107fd9c8af28345e Mon Sep 17 00:00:00 2001 From: nplourde Date: Wed, 11 Jan 2006 02:45:17 +0000 Subject: do not give focus to vo_macosx in shared buffer mode. Patch by Hector Chu git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17359 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_macosx.m | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'libvo/vo_macosx.m') diff --git a/libvo/vo_macosx.m b/libvo/vo_macosx.m index 8cdd8390c1..3b4efef321 100644 --- a/libvo/vo_macosx.m +++ b/libvo/vo_macosx.m @@ -257,26 +257,6 @@ static void uninit(void) 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 @@ static int preinit(const char *arg) 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]]; -- cgit v1.2.3