Index: libvo/vo_quartz.c =================================================================== RCS file: /cvsroot/mplayer/main/libvo/vo_quartz.c,v retrieving revision 1.14 diff -u -r1.14 vo_quartz.c --- libvo/vo_quartz.c 23 Jun 2004 12:48:42 -0000 1.14 +++ libvo/vo_quartz.c 9 Jul 2004 12:04:26 -0000 @@ -701,8 +701,8 @@ static uint32_t preinit(const char *arg) { - int parse_err = 0; - + int parse_err = 0; + if(arg) { char *parse_pos = (char *)&arg[0]; @@ -717,6 +717,20 @@ else if (parse_pos[0]) parse_err = 1; } } + + /* 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); + return 0; }