- (void)setWindowLevel:(NSInteger)i_level forWindow:(vout_window_t *)p_wnd
{
+ VLCVideoWindowCommon *o_window = [o_vout_dict objectForKey:[NSValue valueWithPointer:p_wnd]];
+ if (!o_window) {
+ msg_Err(VLCIntf, "Cannot set level for nonexisting window");
+ return;
+ }
+
// only set level for helper windows to normal if no status vout window exist anymore
if(i_level == NSStatusWindowLevel) {
i_statusLevelWindowCounter++;
- [self updateWindowLevelForHelperWindows:i_level];
+ // window level need to stay on normal in fullscreen mode
+ if (![o_window fullscreen])
+ [self updateWindowLevelForHelperWindows:i_level];
} else {
if (i_statusLevelWindowCounter > 0)
i_statusLevelWindowCounter--;
}
}
- VLCVideoWindowCommon *o_window = [o_vout_dict objectForKey:[NSValue valueWithPointer:p_wnd]];
- if (!o_window) {
- msg_Err(VLCIntf, "Cannot set size for nonexisting window");
- return;
- }
-
[o_window setWindowLevel:i_level];
}
-
- (void)setFullscreen:(int)i_full forWindow:(vout_window_t *)p_wnd
{
intf_thread_t *p_intf = VLCIntf;
if (var_InheritBool(VLCIntf, "video-wallpaper") || [self level] < NSNormalWindowLevel)
return;
- [self setLevel: i_state];
-
+ if (!b_fullscreen)
+ [self setLevel: i_state];
+ else {
+ // only save it for restore
+ // TODO this does not handle the case when level is
+ // changed in the middle of a fullscreen animation
+ i_originalLevel = i_state;
+ }
}
- (NSRect)getWindowRectForProposedVideoViewSize:(NSSize)size
[[VLCMainWindow sharedInstance] recreateHideMouseTimer];
i_originalLevel = [self level];
+ // b_fullscreen must not be true yet
[[[VLCMain sharedInstance] voutController] updateWindowLevelForHelperWindows: NSNormalWindowLevel];
[self setLevel:NSNormalWindowLevel];
/* Make sure we don't see the window flashes in float-on-top mode */
i_originalLevel = [self level];
+ // b_fullscreen must not be true yet
[[[VLCMain sharedInstance] voutController] updateWindowLevelForHelperWindows: NSNormalWindowLevel];
[self setLevel:NSNormalWindowLevel];
-
/* Only create the o_fullscreen_window if we are not in the middle of the zooming animation */
if (!o_fullscreen_window) {
/* We can't change the styleMask of an already created NSWindow, so we create another window, and do eye catching stuff */
[[[VLCMain sharedInstance] voutController] updateWindowLevelForHelperWindows: i_originalLevel];
[self setLevel:i_originalLevel];
+
[self setAlphaValue: config_GetFloat(VLCIntf, "macosx-opaqueness")];
// if we quit fullscreen because there is no video anymore, make sure non-embedded window is not visible