[MPlayer-cvslog] CVS: main/libvo vo_macosx.m,1.18,1.19

Nicolas Plourde CVS syncmail at mplayerhq.hu
Thu Jun 16 02:26:50 CEST 2005


CVS change done by Nicolas Plourde CVS

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

Modified Files:
	vo_macosx.m 
Log Message:
set window alpha

Index: vo_macosx.m
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_macosx.m,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- vo_macosx.m	15 Jun 2005 21:49:50 -0000	1.18
+++ vo_macosx.m	16 Jun 2005 00:26:47 -0000	1.19
@@ -55,6 +55,7 @@
 static float old_movie_aspect;
 extern float vo_panscan;
 
+static float winAlpha = 1;
 static int int_pause = 0;
 
 static vo_info_t info = 
@@ -133,7 +134,7 @@
 		
 	//config OpenGL View
 	[mpGLView config];
-		
+	
 	return 0;
 }
 
@@ -412,7 +413,11 @@
 	NSRect frame;
 	
 	aspect((int *)&d_width, (int *)&d_height,A_NOZOOM);
-	//if(sender == kQuitCmd)
+	
+	if(sender == kQuitCmd)
+	{
+		mplayer_put_key(KEY_ESC);
+	}
 	
 	if(sender == kHalfScreenCmd)
 	{
@@ -764,6 +769,19 @@
 }
 
 /*
+	From NSView, respond to key equivalents.
+*/
+- (BOOL)performKeyEquivalent:(NSEvent *)theEvent
+{
+	switch([theEvent keyCode])
+    {
+		case 0x21: [window setAlphaValue: winAlpha-=0.05]; return YES;
+		case 0x1e: [window setAlphaValue: winAlpha+=0.05]; return YES;
+    }
+	return NO;
+}
+
+/*
 	Process key event
 */
 - (void) keyDown: (NSEvent *) theEvent




More information about the MPlayer-cvslog mailing list