[vlc-commits] [Git][videolan/vlc][master] 2 commits: macosx: Expose voutWindows as public readonly property of VLCVideoOutputProvider

Steve Lhomme (@robUx4) gitlab at videolan.org
Sun Nov 19 05:33:21 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
a8517113 by Claudio Cambra at 2023-11-19T05:09:24+00:00
macosx: Expose voutWindows as public readonly property of VLCVideoOutputProvider

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
de025b60 by Claudio Cambra at 2023-11-19T05:09:24+00:00
macosx: Restore external windows if videos !isEmbedded when clicking library window thumbnail button

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -


3 changed files:

- modules/gui/macosx/library/VLCLibraryWindow.m
- modules/gui/macosx/windows/video/VLCVideoOutputProvider.h
- modules/gui/macosx/windows/video/VLCVideoOutputProvider.m


Changes:

=====================================
modules/gui/macosx/library/VLCLibraryWindow.m
=====================================
@@ -864,6 +864,15 @@ static void addShadow(NSImageView *__unsafe_unretained imageView)
     _splitViewBottomConstraintToSuperView.priority = 1;
 }
 
+- (void)presentExternalWindows
+{
+    VLCVideoOutputProvider * const voutProvider = VLCMain.sharedInstance.voutProvider;
+    NSArray<NSWindow *> * const voutWindows = voutProvider.voutWindows.allValues;
+    for (NSWindow * const window in voutWindows) {
+        [window makeKeyAndOrderFront:self];
+    }
+}
+
 - (void)presentVideoView
 {
     for (NSView *subview in _libraryTargetView.subviews) {
@@ -912,6 +921,12 @@ static void addShadow(NSImageView *__unsafe_unretained imageView)
 
 - (void)enableVideoPlaybackAppearance
 {
+    const BOOL isEmbedded = var_InheritBool(getIntf(), "embedded-video");
+    if (!isEmbedded) {
+        [self presentExternalWindows];
+        return;
+    }
+
     [self presentVideoView];
 
     [self.segmentedTitleControl setHidden:YES];


=====================================
modules/gui/macosx/windows/video/VLCVideoOutputProvider.h
=====================================
@@ -35,6 +35,7 @@ extern NSString *VLCWindowLevelKey;
 @interface VLCVideoOutputProvider : NSObject
 
 @property (readonly, nonatomic) NSInteger currentStatusWindowLevel;
+ at property (readonly) NSDictionary *voutWindows;
 
 - (VLCVoutView *)setupVoutForWindow:(vlc_window_t *)p_wnd withProposedVideoViewPosition:(NSRect)videoViewPosition;
 - (void)removeVoutForDisplay:(NSValue *)o_key;


=====================================
modules/gui/macosx/windows/video/VLCVideoOutputProvider.m
=====================================
@@ -608,4 +608,12 @@ int WindowOpen(vlc_window_t *p_wnd)
     [NSNotificationCenter.defaultCenter postNotificationName:VLCWindowShouldUpdateLevel object:self userInfo:@{VLCWindowLevelKey : @(_currentWindowLevel)}];
 }
 
+#pragma mark -
+#pragma mark Property methods
+
+- (NSDictionary *)voutWindows
+{
+    return _voutWindows.copy;
+}
+
 @end



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/933c2d055c5592ebb576e10a90cde198e05aaa45...de025b607256eec049b09f4b84328d9c0ea239a7

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/933c2d055c5592ebb576e10a90cde198e05aaa45...de025b607256eec049b09f4b84328d9c0ea239a7
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list