[gnome-shell] status/remote-access: Don't show recording icon for screenshot UI casts



commit 2949244d72d3fdba48436bc46a9a5e0c05c188d8
Author: Ivan Molodetskikh <yalterz gmail com>
Date:   Wed Feb 9 10:00:07 2022 +0300

    status/remote-access: Don't show recording icon for screenshot UI casts
    
    If there's only a single recording and it is the screenshot UI
    recording, don't show the icon, because it's already displayed by the
    new panel.
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2163>

 js/ui/status/remoteAccess.js | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/status/remoteAccess.js b/js/ui/status/remoteAccess.js
index 605ad69c68..992215ad3c 100644
--- a/js/ui/status/remoteAccess.js
+++ b/js/ui/status/remoteAccess.js
@@ -58,7 +58,15 @@ class RemoteAccessApplet extends PanelMenu.SystemIndicator {
     }
 
     _isRecording() {
-        return [...this._handles].some(handle => handle.is_recording);
+        const recordingHandles =
+            [...this._handles].filter(handle => handle.is_recording);
+
+        // Screenshot UI screencasts have their own panel, so don't show this
+        // indicator if there's only a screenshot UI screencast.
+        if (Main.screenshotUI.screencast_in_progress)
+            return recordingHandles.length > 1;
+
+        return recordingHandles.length > 0;
     }
 
     _sync() {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]