do not give focus to vo_macosx in shared buffer mode. Patch by Hector Chu<hectorchu@gmail.com>

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17359 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
nplourde 2006-01-11 02:45:17 +00:00
parent 54db36459f
commit 74a12366c1
1 changed files with 20 additions and 20 deletions

View File

@ -258,26 +258,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)
{
char *parse_pos = (char *)&arg[0];
@ -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]];