Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
713d1596 by Claudio Cambra at 2024-06-18T16:56:09+00:00
macosx: Separate updating of pin indicator image visibility with notification 
handler

Signed-off-by: Claudio Cambra <[email protected]>

- - - - -
54c32fc9 by Claudio Cambra at 2024-06-18T16:56:09+00:00
macosx: Update float on top indicator on view load

Signed-off-by: Claudio Cambra <[email protected]>

- - - - -


1 changed file:

- modules/gui/macosx/windows/video/VLCMainVideoViewController.m


Changes:

=====================================
modules/gui/macosx/windows/video/VLCMainVideoViewController.m
=====================================
@@ -172,6 +172,7 @@
 
     [self setupAudioDecorativeView];
     [self.controlsBar update];
+    [self updateFloatOnTopIndicator];
 }
 
 - (void)updateDecorativeViewVisibilityOnControllerChange:(VLCPlayerController 
*)controller
@@ -233,11 +234,24 @@
 {
     VLCVideoWindowCommon * const videoWindow = (VLCVideoWindowCommon 
*)notification.object;
     NSAssert(videoWindow != nil, @"Received video window should not be nil!");
-    NSDictionary<NSString *, NSNumber *> * const userInfo = 
notification.userInfo;
-    NSAssert(userInfo != nil, @"Received user info should not be nil!");
-    NSNumber * const enabledNumberWrapper = 
userInfo[VLCWindowFloatOnTopEnabledNotificationKey];
-    NSAssert(enabledNumberWrapper != nil, @"Received user info enabled wrapper 
should not be nil!");
-    self.floatOnTopIndicatorImageView.hidden = !enabledNumberWrapper.boolValue;
+    VLCVideoWindowCommon * const selfVideoWindow = (VLCVideoWindowCommon 
*)self.view.window;
+
+    if (videoWindow != selfVideoWindow) {
+        return;
+    }
+
+    [self updateFloatOnTopIndicator];
+}
+
+- (void)updateFloatOnTopIndicator
+{
+    vout_thread_t * const voutThread = self.voutView.voutThread;
+    if (voutThread == NULL) {
+        return;
+    }
+
+    const bool floatOnTopEnabled = var_GetBool(voutThread, "video-on-top");
+    self.floatOnTopIndicatorImageView.hidden = !floatOnTopEnabled;
 }
 
 - (BOOL)mouseOnControls



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/50aa68ea7e53420d008cc17131d7f8ef6be98fbd...54c32fc9eae608309d86c663eea8799deab1fde6

-- 
This project does not include diff previews in email notifications.
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/50aa68ea7e53420d008cc17131d7f8ef6be98fbd...54c32fc9eae608309d86c663eea8799deab1fde6
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to