[vlc-commits] [Git][videolan/vlc][master] 2 commits: macosx: Correctly apply visibility of path control on view reloading, rather...

Steve Lhomme (@robUx4) gitlab at videolan.org
Tue Sep 23 11:03:57 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
9a9ba149 by Claudio Cambra at 2025-09-23T10:48:58+00:00
macosx: Correctly apply visibility of path control on view reloading, rather than just toggling value

- - - - -
6576d8b6 by Claudio Cambra at 2025-09-23T10:48:58+00:00
macosx: Fix issue with glass path control background incorrectly being visible when switching away from, then back to, media source view

- - - - -


3 changed files:

- modules/gui/macosx/library/VLCLibraryWindow.h
- modules/gui/macosx/library/media-source/VLCLibraryMediaSourceViewController.m
- modules/gui/macosx/library/media-source/VLCMediaSourceBaseDataSource.m


Changes:

=====================================
modules/gui/macosx/library/VLCLibraryWindow.h
=====================================
@@ -91,8 +91,11 @@ extern const NSUserInterfaceItemIdentifier VLCLibraryWindowIdentifier;
 @property (readwrite, weak) IBOutlet NSScrollView *audioLibraryGridModeSplitViewListSelectionCollectionViewScrollView;
 @property (readwrite, weak) IBOutlet VLCLibraryCollectionView *audioLibraryGridModeSplitViewListSelectionCollectionView;
 @property (readwrite, weak) IBOutlet NSView *mediaSourceView;
- at property (readwrite, weak) IBOutlet NSButton *mediaSourceHomeButton;
- at property (readwrite, weak) IBOutlet VLCInputNodePathControl *mediaSourcePathControl;
+// These two media source controls are held strongly due to their handling within the media source view controller.
+// Specifically, we do some custom handling to give them the glass background on macOS 26.0 and later; to avoid deallocation
+// when removing the glass container view from the media source view, we must hold them strongly.
+ at property (readwrite, strong) IBOutlet NSButton *mediaSourceHomeButton;
+ at property (readwrite, strong) IBOutlet VLCInputNodePathControl *mediaSourcePathControl;
 @property (readwrite, weak) IBOutlet NSVisualEffectView *mediaSourcePathControlVisualEffectView;
 @property (readwrite, weak) IBOutlet NSScrollView *mediaSourceTableViewScrollView;
 @property (readwrite, weak) IBOutlet NSTableView *mediaSourceTableView;


=====================================
modules/gui/macosx/library/media-source/VLCLibraryMediaSourceViewController.m
=====================================
@@ -76,6 +76,15 @@
     return self;
 }
 
+- (void)dealloc
+{
+    if (@available(macOS 26.0, *)) {
+#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 260000
+        [self.pathControlGlassEffectView removeFromSuperview];
+#endif
+    }
+}
+
 - (void)setupPropertiesFromLibraryWindow:(VLCLibraryWindow *)libraryWindow
 {
     NSParameterAssert(libraryWindow);


=====================================
modules/gui/macosx/library/media-source/VLCMediaSourceBaseDataSource.m
=====================================
@@ -151,7 +151,7 @@ NSString * const VLCMediaSourceBaseDataSourceNodeChanged = @"VLCMediaSourceBaseD
     } else {
         NSAssert(false, @"View mode must be grid or list mode");
     }
-    [self togglePathControlVisibility:!_pathControlContainerView.hidden];
+    [self togglePathControlVisibility:self.childDataSource != nil];
 }
 
 - (void)loadMediaSources



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/2062896498c6d7f1d7b90b299a947e6add0f7467...6576d8b6d20e27a3e7dd62c89df28eafc46ec8c3

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/2062896498c6d7f1d7b90b299a947e6add0f7467...6576d8b6d20e27a3e7dd62c89df28eafc46ec8c3
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