# HG changeset patch # User nplourde # Date 1118881607 0 # Node ID 532a351962fb91412278705d5dde44554d750585 # Parent 0bc42444c1103a2014adc2a81272a6c0b03852c5 set window alpha diff -r 0bc42444c110 -r 532a351962fb libvo/vo_macosx.m --- a/libvo/vo_macosx.m Wed Jun 15 22:37:38 2005 +0000 +++ b/libvo/vo_macosx.m Thu Jun 16 00:26:47 2005 +0000 @@ -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