BOOL b_inFullscreen = [self fullscreen] || ([self respondsToSelector:@selector(inFullscreenTransition)] && [(VLCVideoWindowCommon *)self inFullscreenTransition]);
- if(OSX_MAVERICKS && b_inFullscreen && constrainedRect.size.width == screenRect.size.width
+ if((OSX_MAVERICKS || OSX_YOSEMITE) && b_inFullscreen && constrainedRect.size.width == screenRect.size.width
&& constrainedRect.size.height != screenRect.size.height
&& abs(screenRect.size.height - constrainedRect.size.height) <= 25.) {
@synthesize videoView=o_video_view;
@synthesize controlsBar=o_controls_bar;
@synthesize inFullscreenTransition=b_in_fullscreen_transition;
+@synthesize windowShouldExitFullscreenWhenFinished=b_windowShouldExitFullscreenWhenFinished;
#pragma mark -
#pragma mark Init
if (b_nativeFullscreenMode) {
[self setCollectionBehavior: NSWindowCollectionBehaviorFullScreenPrimary];
- } else {
- [o_titlebar_view setFullscreenButtonHidden: YES];
}
+
[super awakeFromNib];
}
[super mouseMoved: theEvent];
}
+#pragma mark -
+#pragma mark Key events
+
+- (void)flagsChanged:(NSEvent *)theEvent
+{
+ BOOL b_alt_pressed = ([theEvent modifierFlags] & NSAlternateKeyMask) != 0;
+ [o_titlebar_view informModifierPressed: b_alt_pressed];
+
+ [super flagsChanged:theEvent];
+}
+
#pragma mark -
#pragma mark Lion native fullscreen handling
- (void)windowWillEnterFullScreen:(NSNotification *)notification
{
- // workaround, see #6668
- [NSApp setPresentationOptions:(NSApplicationPresentationFullScreen | NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar)];
-
i_originalLevel = [self level];
+ b_windowShouldExitFullscreenWhenFinished = [[VLCMain sharedInstance] activeVideoPlayback];
+
// b_fullscreen and b_in_fullscreen_transition must not be true yet
[[[VLCMain sharedInstance] voutController] updateWindowLevelForHelperWindows: NSNormalWindowLevel];
[self setLevel:NSNormalWindowLevel];
if ([[subviews objectAtIndex:x] respondsToSelector:@selector(reshape)])
[[subviews objectAtIndex:x] reshape];
}
-
}
- (void)windowWillExitFullScreen:(NSNotification *)notification
b_in_fullscreen_transition = YES;
[self setFullscreen: NO];
- var_SetBool(pl_Get(VLCIntf), "fullscreen", false);
-
if ([self hasActiveVideo]) {
+ var_SetBool(pl_Get(VLCIntf), "fullscreen", false);
+
vout_thread_t *p_vout = getVoutForActiveWindow();
if (p_vout) {
var_SetBool(p_vout, "fullscreen", false);
o_fullscreen_anim2 = nil;
}
+ b_in_fullscreen_transition = YES;
+ [self setFullscreen:NO];
+
if (!b_animation) {
/* We don't animate if we are not visible, instead we
* simply fade the display */
return;
}
- b_in_fullscreen_transition = YES;
- [self setFullscreen:NO];
-
[self setAlphaValue: 0.0];
[self orderFront: self];
[[o_video_view window] orderFront: self];