[Mplayer-cvslog] CVS: main/libvo vo_quartz.c,1.14,1.15
Nicolas Plourde CVS
syncmail at mplayerhq.hu
Fri Jul 9 18:55:00 CEST 2004
CVS change done by Nicolas Plourde CVS
Update of /cvsroot/mplayer/main/libvo
In directory mail:/var2/tmp/cvs-serv17269/libvo
Modified Files:
vo_quartz.c
Log Message:
make mplayer capable of being in the foreground by Dan Christiansen
Index: vo_quartz.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_quartz.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- vo_quartz.c 23 Jun 2004 12:48:42 -0000 1.14
+++ vo_quartz.c 9 Jul 2004 16:54:57 -0000 1.15
@@ -9,8 +9,7 @@
MPlayer Mac OSX Quartz video out module.
- todo: -'plist' resource
- -RGB32 color space support
+ todo: -RGB32 color space support
-rootwin
-screen overlay output
-while mouse button down event mplayer is locked, fix that
@@ -302,7 +301,7 @@
CreateNewWindow(kDocumentWindowClass, windowAttrs, &winRect, &theWindow);
//Set window title
- titleKey = CFSTR("MPlayer");
+ titleKey = CFSTR("MPlayer - The Movie Player");
windowTitle = CFCopyLocalizedString(titleKey, NULL);
result = SetWindowTitleWithCFString(theWindow, windowTitle);
CFRelease(titleKey);
@@ -717,6 +716,26 @@
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;
}
More information about the MPlayer-cvslog
mailing list