summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authornplourde <nplourde@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-01-11 02:45:17 +0000
committernplourde <nplourde@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-01-11 02:45:17 +0000
commit74a12366c163d43cb4900806107fd9c8af28345e (patch)
treee8ca192867e10f5196b1132e3633471302e1ecf3 /libvo
parent54db36459fe2b3cee437e7742e344a958375fcae (diff)
downloadmpv-74a12366c163d43cb4900806107fd9c8af28345e.tar.bz2
mpv-74a12366c163d43cb4900806107fd9c8af28345e.tar.xz
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
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_macosx.m40
1 files changed, 20 insertions, 20 deletions
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]];