[MPlayer-cvslog] CVS: main/libvo vo_macosx.m, 1.3, 1.4 vo_macosx.h, 1.1, 1.2

Nicolas Plourde CVS syncmail at mplayerhq.hu
Mon May 2 20:06:02 CEST 2005


CVS change done by Nicolas Plourde CVS

Update of /cvsroot/mplayer/main/libvo
In directory mail:/var2/tmp/cvs-serv2356/libvo

Modified Files:
	vo_macosx.m vo_macosx.h 
Log Message:
enable rootwin

Index: vo_macosx.m
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_macosx.m,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- vo_macosx.m	2 May 2005 14:40:16 -0000	1.3
+++ vo_macosx.m	2 May 2005 18:05:59 -0000	1.4
@@ -50,6 +50,7 @@
 extern int vo_fs;
 static int isFullscreen;
 static int isOntop;
+static int isRootwin;
 extern float monitor_aspect;
 extern int vo_keepaspect;
 extern float movie_aspect;
@@ -141,6 +142,9 @@
 	
 	vo_fs = flags & VOFLAG_FULLSCREEN;
 	
+	if(vo_rootwin)
+		[glView rootwin];	
+
 	if(vo_fs)
 		[glView fullscreen: NO];
 	
@@ -280,6 +284,7 @@
 		case VOCTRL_RESUME: return (int_pause=0);
 		case VOCTRL_QUERY_FORMAT: return query_format(*((uint32_t*)data));
 		case VOCTRL_ONTOP: vo_ontop = (!(vo_ontop)); [glView ontop]; return VO_TRUE;
+		case VOCTRL_ROOTWIN: vo_rootwin = (!(vo_rootwin)); [glView rootwin]; return VO_TRUE;
 		case VOCTRL_FULLSCREEN: vo_fs = (!(vo_fs)); [glView fullscreen: YES]; return VO_TRUE;
 		case VOCTRL_GET_PANSCAN: return VO_TRUE;
 		case VOCTRL_SET_PANSCAN: [glView panscan]; return VO_TRUE;
@@ -312,7 +317,7 @@
 	[window setAcceptsMouseMovedEvents:YES];
     [window setTitle:@"MPlayer - The Movie Player"];
 	[window center];
-	[window makeKeyAndOrderFront:nil];
+	[window makeKeyAndOrderFront:self];
 	
 	[self setOpenGLContext:glContext];
 	[glContext setView:self];
@@ -424,7 +429,7 @@
 	glFlush();
 	
 	//auto hide mouse cursor and futur on-screen control?
-	if(isFullscreen && !mouseHide)
+	if(isFullscreen && !mouseHide && !isRootwin)
 	{
 		DateTimeRec d;
 		unsigned long curTime;
@@ -477,10 +482,13 @@
 	//go fullscreen
 	if(vo_fs)
 	{
-		//hide menubar and mouse if fullscreen on main display
-		HideMenuBar();
-		HideCursor();
-		mouseHide = YES;
+		if(!isRootwin)
+		{
+			//hide menubar and mouse if fullscreen on main display
+			HideMenuBar();
+			HideCursor();
+			mouseHide = YES;
+		}
 		
 		panscan_calc();
 		old_frame = [window frame];	//save main window size & position
@@ -535,6 +543,24 @@
 }
 
 /*
+	Toggle rootwin
+ */
+- (void) rootwin
+{
+	if(vo_rootwin)
+	{
+		[window setLevel:CGWindowLevelForKey(kCGDesktopWindowLevelKey)];
+		[window orderBack:self];
+		isRootwin = YES;
+	}
+	else
+	{
+		[window setLevel:NSNormalWindowLevel];
+		isRootwin = NO;
+	}
+}
+
+/*
 	Check event for new event
 */ 
 - (void) check_events
@@ -608,7 +634,7 @@
 */
 - (void) mouseMoved: (NSEvent *) theEvent
 {
-	if(isFullscreen)
+	if(isFullscreen && !isRootwin)
 	{
 		ShowMenuBar();
 		ShowCursor();

Index: vo_macosx.h
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_macosx.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- vo_macosx.h	29 Apr 2005 11:05:16 -0000	1.1
+++ vo_macosx.h	2 May 2005 18:05:59 -0000	1.2
@@ -10,6 +10,7 @@
 
 #import <Cocoa/Cocoa.h>
 #import <QuartzCore/QuartzCore.h>
+#import <QuickTime/QuickTime.h>
 
 @interface CustomOpenGLView : NSOpenGLView
 {
@@ -45,6 +46,7 @@
 - (void) fullscreen: (BOOL) animate;
 - (void) ontop;
 - (void) panscan;
+- (void) rootwin;
 
 //event
 - (void) keyDown: (NSEvent *) theEvent;




More information about the MPlayer-cvslog mailing list