X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fmacosx%2Fvout.m;h=78e04a5daabafcb91b840f3bcab22b257d726d63;hb=45915c74f0baaaed6527dc888f3e4263fb50e7d7;hp=d5aa8ab310fb9f92aa3b4d3804e6d50ce25d43b5;hpb=ab1251ee872eb9e08d529857344f808226e84f46;p=vlc diff --git a/modules/gui/macosx/vout.m b/modules/gui/macosx/vout.m index d5aa8ab310..78e04a5daa 100644 --- a/modules/gui/macosx/vout.m +++ b/modules/gui/macosx/vout.m @@ -417,6 +417,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, - (BOOL)isFullscreen { vlc_value_t val; + if( !p_real_vout ) return NO; var_Get( p_real_vout, "fullscreen", &val ); return( val.b_bool ); } @@ -438,6 +439,12 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, return o_window; } +- (void)scrollWheel:(NSEvent *)theEvent +{ + VLCControls * o_controls = (VLCControls *)[[NSApp delegate] getControls]; + [o_controls scrollWheel: theEvent]; +} + - (void)keyDown:(NSEvent *)o_event { unichar key = 0; @@ -750,13 +757,13 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, - (void)enterFullscreen { - [[o_view class] resetVout: p_vout]; + [[o_view class] performSelectorOnMainThread:@selector(resetVout:) withObject:[NSValue valueWithPointer:p_vout] waitUntilDone:YES]; [[[[VLCMain sharedInstance] getControls] getFSPanel] setActive: nil]; } - (void)leaveFullscreen { - [[o_view class] resetVout: p_vout]; + [[o_view class] performSelectorOnMainThread:@selector(resetVout:) withObject:[NSValue valueWithPointer:p_vout] waitUntilDone:YES]; [[[[VLCMain sharedInstance] getControls] getFSPanel] setNonActive: nil]; } @@ -938,6 +945,8 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, [self scaleWindowWithFactor: 1.0 animate: [o_window isVisible] && (![o_window isFullscreen])]; + [o_window setAspectRatio:NSMakeSize([o_window frame].size.width, [o_window frame].size.height)]; + /* Make sure our window is visible, if we are not in fullscreen */ if (![o_window isFullscreen]) [o_window makeKeyAndOrderFront: self]; @@ -1030,7 +1039,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, /* move the FSPanel to front in case that it is currently shown * this won't and is not supposed to work when it's fading right now */ if( [[[[VLCMain sharedInstance] getControls] getFSPanel] isDisplayed] ) - [[[[VLCMain sharedInstance] getControls] getFSPanel] orderFront: self]; + [[[[VLCMain sharedInstance] getControls] getFSPanel] setActive: nil]; /* tell the fspanel to move itself to front next time it's triggered */ [[[[VLCMain sharedInstance] getControls] getFSPanel] setVoutWasUpdated: i_device];