[vlc-devel] [PATCH 3/5] macosx: Rename and invert isNotEmbedded
Marvin Scholz
epirat07 at gmail.com
Mon Aug 7 21:57:07 CEST 2017
This makes it easier to understand the meaning and read the code.
---
modules/gui/macosx/VLCVoutWindowController.m | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/modules/gui/macosx/VLCVoutWindowController.m b/modules/gui/macosx/VLCVoutWindowController.m
index 1761f71afd..df35ca0b85 100644
--- a/modules/gui/macosx/VLCVoutWindowController.m
+++ b/modules/gui/macosx/VLCVoutWindowController.m
@@ -229,7 +229,7 @@ - (void)dealloc
- (VLCVoutView *)setupVoutForWindow:(vout_window_t *)p_wnd withProposedVideoViewPosition:(NSRect)videoViewPosition
{
- BOOL isNotEmbedded = NO;
+ BOOL isEmbedded = YES;
BOOL isNativeFullscreen = [[VLCMain sharedInstance] nativeFullscreenMode];
BOOL windowDecorations = var_InheritBool(getIntf(), "video-deco");
BOOL videoWallpaper = var_InheritBool(getIntf(), "video-wallpaper");
@@ -296,14 +296,14 @@ - (VLCVoutView *)setupVoutForWindow:(vout_window_t *)p_wnd withProposedVideoView
[newVideoWindow setContentMinSize: NSMakeSize(f_min_video_height, f_min_video_height)];
}
- isNotEmbedded = YES;
+ isEmbedded = NO;
} else {
if ((var_InheritBool(getIntf(), "embedded-video") && !mainWindowHasVideo)) {
// setup embedded video
newVideoWindow = [[VLCMain sharedInstance] mainWindow] ;
voutView = [newVideoWindow videoView];
- isNotEmbedded = NO;
mainWindowHasVideo = YES;
+ isEmbedded = YES;
} else {
// setup detached window with controls
NSWindowController *o_controller = [[NSWindowController alloc] initWithWindowNibName:@"DetachedVideoWindow"];
@@ -318,7 +318,7 @@ - (VLCVoutView *)setupVoutForWindow:(vout_window_t *)p_wnd withProposedVideoView
[newVideoWindow setLevel:NSNormalWindowLevel];
[newVideoWindow useOptimizedDrawing: YES];
voutView = [newVideoWindow videoView];
- isNotEmbedded = YES;
+ isEmbedded = NO;
}
}
@@ -329,7 +329,7 @@ - (VLCVoutView *)setupVoutForWindow:(vout_window_t *)p_wnd withProposedVideoView
if (!videoWallpaper) {
// set (only!) window origin if specified
- if (isNotEmbedded) {
+ if (!isEmbedded) {
NSRect window_rect = [newVideoWindow frame];
if (videoViewPosition.origin.x > 0.)
window_rect.origin.x = videoViewPosition.origin.x;
@@ -371,7 +371,7 @@ - (VLCVoutView *)setupVoutForWindow:(vout_window_t *)p_wnd withProposedVideoView
if ([newVideoWindow class] == [VLCMainWindow class])
[[[VLCMain sharedInstance] mainWindow] changePlaylistState: psVideoStartedOrStoppedEvent];
- if (isNotEmbedded) {
+ if (!isEmbedded) {
// events might be posted before window is created, so call them again
[[[VLCMain sharedInstance] mainWindow] updateName];
[[[VLCMain sharedInstance] mainWindow] updateWindow]; // update controls bar
--
2.11.0 (Apple Git-81)
More information about the vlc-devel
mailing list