[[VLCMainWindow sharedInstance] setNonembedded:b_nonembedded];
[o_vout_view setVoutThread:(vout_thread_t *)p_wnd->p_parent];
+ [o_new_video_window setHasActiveVideo: YES];
[o_vout_dict setObject:[o_new_video_window autorelease] forKey:[NSValue valueWithPointer:p_wnd]];
if (b_nonembedded) {
if ([[VLCMainWindow sharedInstance] fullscreen] && ![[VLCMainWindow sharedInstance] nativeFullscreenMode])
[o_window leaveFullscreen];
+ if ([[VLCMainWindow sharedInstance] fullscreen] && [[VLCMainWindow sharedInstance] nativeFullscreenMode])
+ [o_window toggleFullScreen: self];
+
+
if (![NSStringFromClass([o_window class]) isEqualToString:@"VLCMainWindow"]) {
[o_window orderOut:self];
}
[[o_window videoView] releaseVoutThread];
+ [o_window setHasActiveVideo: NO];
[o_vout_dict removeObjectForKey:o_key];
if ([o_vout_dict count] == 0)
@synthesize videoView=o_video_view;
@synthesize controlsBar=o_controls_bar;
+@synthesize hasActiveVideo=b_has_active_video;
#pragma mark -
#pragma mark Init
var_SetBool(pl_Get(VLCIntf), "fullscreen", true);
- vout_thread_t *p_vout = getVoutForActiveWindow();
- if (p_vout) {
- var_SetBool(p_vout, "fullscreen", true);
- vlc_object_release(p_vout);
+ if ([self hasActiveVideo]) {
+ vout_thread_t *p_vout = getVoutForActiveWindow();
+ if (p_vout) {
+ var_SetBool(p_vout, "fullscreen", true);
+ vlc_object_release(p_vout);
+ }
}
[o_video_view setFrame: [[self contentView] frame]];
[self setFrame: winrect display:NO animate:NO];
}
- if ([[VLCMain sharedInstance] activeVideoPlayback])
+ // TODO fix bottom bar status when vout just not visible, but there
+ if (![o_video_view isHidden])
[[o_controls_bar bottomBarView] setHidden: YES];
[self setMovableByWindowBackground: NO];
// But this creates some problems when leaving fs over remote intfs, so activate app here.
[NSApp activateIgnoringOtherApps:YES];
-
- [[[VLCMainWindow sharedInstance] fsPanel] setVoutWasUpdated: self];
- [[[VLCMainWindow sharedInstance] fsPanel] setActive: nil];
+ if ([self hasActiveVideo]) {
+ [[[VLCMainWindow sharedInstance] fsPanel] setVoutWasUpdated: self];
+ [[[VLCMainWindow sharedInstance] fsPanel] setActive: nil];
+ }
NSArray *subviews = [[self videoView] subviews];
NSUInteger count = [subviews count];
{
var_SetBool(pl_Get(VLCIntf), "fullscreen", false);
- vout_thread_t *p_vout = getVoutForActiveWindow();
- if (p_vout) {
- var_SetBool(p_vout, "fullscreen", false);
- vlc_object_release(p_vout);
+ if ([self hasActiveVideo]) {
+ vout_thread_t *p_vout = getVoutForActiveWindow();
+ if (p_vout) {
+ var_SetBool(p_vout, "fullscreen", false);
+ vlc_object_release(p_vout);
+ }
}
[NSCursor setHiddenUntilMouseMoves: NO];