Closed Bug 1668358 Opened 4 years ago Closed 1 year ago

Wayland: Disable Firefox' webrtc indicator and rely on the desktop environment's screensharing indicator (was: Implement nsISystemStatusBar)

Categories

(Core :: Widget: Gtk, enhancement, P3)

Desktop
Linux
enhancement

Tracking

()

RESOLVED FIXED
117 Branch
Tracking Status
relnote-firefox --- 117+
firefox117 --- fixed

People

(Reporter: mconley, Assigned: rmader)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Spun out from bug 1663784, this will allow us to show the WebRTC device indicators in the system status bar by using the GtkStatusIcon API.

I'm also hoping I can use this as an opportunity to clean up / refactor the IconLoader API a bit, since the approach I used in bug 1663784 ultimately seems a bit unwieldy.

My current plan is to turn IconLoader into IconLoaderBase with the Gecko part of the icon loading implemented, and have each supported platform subclass IconLoaderBase into something appropriate for converting the imgIContainer* into the native icon asset.

mstange had also suggested I try to change the API to be Promise based, rather than making consumers of the API implement IconLoaderListener things.

Component: Site Permissions → Widget: Gtk
Product: Firefox → Core
Priority: -- → P3

We should rather use GNotification (https://developer.gnome.org/gio/stable/GNotification.html) as GtkStatusIcon is deprecated.

OTOH I'm not sure if GNotification can be used for the indicator so we may need to use GtkStatusIcon anyway.

Blocks: 1652518

Indeed GtkStatusIcon doesn't exist anymore since GTK 3.14. I have no idea if notifications are the right place vs GNOME Shell's global system menu in the top-right corner (in case this observation helps somehow: under Wayland, GNOME Shell has a global indicator for screensharing/recording being on), you probably want to have a direct discussion with GTK + GNOME Shell developers about this...

Hey stransky,

A few years have passed since I last looked at this. Has the distro landscape changed any such that the right approach has more or less emerged for something like this?

Flags: needinfo?(stransky)

(In reply to Mike Conley (:mconley) (:⚙️) from comment #5)

Hey stransky,

A few years have passed since I last looked at this. Has the distro landscape changed any such that the right approach has more or less emerged for something like this?

AFAIK Gnome doesn't allow plain applications to put anything to gnome status bar. You need extra extension to display apps notifications like this one: https://extensions.gnome.org/extension/3681/top-indicator-app/. By default notifications on tom panel are from system apps only.

As for the webrtc status indicator - when portal is used (Wayland/XWayland) Gnome shows screen sharing indicator by default and that indicates any application shares screen/window whatever. (It also shows indicator when screen is recorder for instance). You can also quit sharing by the indicator.

So under Gnome/Wayland it may be possible to drop the indicator completely and use the system one only.

Flags: needinfo?(stransky)

IIUC, always-on-top (bug 1621261) and sticking-to-the-top are not possible on Wayland for security reasons.

Blocks: 1676705
OS: Unspecified → Linux
Hardware: Unspecified → Desktop
Summary: Implement nsISystemStatusBar for Linux → Linux: Disable Firefox' webrtc indicator and rely on the desktop environment's microphone&screensharing indicator (was: Implement nsISystemStatusBar)
No longer blocks: 1676705
Depends on: 1676705

Pipewire screensharing already shows an indicator on KDE whenever the screen is shared to Firefox (or any other app), so this could be disabled on Wayland when using Pipewire (although you'd have to make sure that GNOME does the same thing)

Gnome does the same thing. As sharing is managed by OS we don't need extra indicator created by Firefox on Wayland.

Mike, any idea how to disable the indicator completely? Is there any pref/code for it?
If you wish I can provide you screencast/screenshots to show you how the OS level WebRTC sharing indicator looks on GNOME/KDE.

Flags: needinfo?(mconley)

privacy.webrtc.hideGlobalIndicator=true
We just need to find out if Sway shows a pipewire indicator as well or not.

Flags: needinfo?(mconley)
No longer blocks: 1642799, 1652518
Duplicate of this bug: 1685394

Just wanted to add that this would be very welcomed by core devs of all major DEs, including Gnome, KDE and Sway :)

Also note: these DEs don't yet have indicators for cameras - only microphone and screen sharing - but work on that is on the way. So when Firefox uses Pipewire for camera access DEs can ensure that there's an indicator.

Yes, privacy.webrtc.hideGlobalIndicator will control the visibility of the new indicator.

I think whatever we do here, we'll want either someone from PrivSec or WebRTC to sign-off. I'll personally be thrilled if bug 1676705 lands, and we can get the legacy indicator removed entirely.

Summary: Linux: Disable Firefox' webrtc indicator and rely on the desktop environment's microphone&screensharing indicator (was: Implement nsISystemStatusBar) → Linux: Disable Firefox' webrtc indicator and rely on the desktop environment's screensharing indicator (was: Implement nsISystemStatusBar)
Duplicate of this bug: 1715986
Flags: needinfo?(stransky)
Duplicate of this bug: 1841543

(In reply to Darkspirit from comment #12)

privacy.webrtc.hideGlobalIndicator=true
We just need to find out if Sway shows a pipewire indicator as well or not.

I recently talked with Simon (the lead dev of Sway) about this because I was assuming in order to get rid of the indicator we first need to ensure to have a camera indicator provided by the DE. IIUC that's not the case any more, since the new global indicator is only used for screen sharing[1]. So Sway doesn't have an indicator for screensharing by default - but there is one available if users want one.

Given that this is how Sway works (minimal defaults) and that the FF indicator is even more intrusive for tiling managers than floating ones - I think almost everybody using Sway disables it - IMO it fine to just go ahead (i.e. disable the indicator on Wayland).


1.: camera indicator support for Gnome is tracked in https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2500 and depends on using Pipewire for cameras (bug 1724900).

See Also: → 1724900

Robert, do you mind to create a patch for it?
Thanks.

Flags: needinfo?(stransky) → needinfo?(robert.mader)

(In reply to Martin Stránský [:stransky] (ni? me) from comment #19)

Robert, do you mind to create a patch for it?
Thanks.

Yep, can look into it.

Assignee: nobody → robert.mader
Flags: needinfo?(robert.mader)
Summary: Linux: Disable Firefox' webrtc indicator and rely on the desktop environment's screensharing indicator (was: Implement nsISystemStatusBar) → Wayland: Disable Firefox' webrtc indicator and rely on the desktop environment's screensharing indicator (was: Implement nsISystemStatusBar)

The indicator never worked well on Wayland as the protocol gives us
little control about window positioning, focus etc. by design, creating
a quite bad user experience.

At the same time Wayland puts constrains on recording the display,
enabling system compositors to control it and, crucially, show
indicators itself - which all major DEs do or at least support.

Unfortunately we can't disable the indicator at build-time as our builds
support both Wayland and X11. Thus introduce a runtime setting which
gets automatically set at startup, allowing to disable the indicator.

Screen sharing indicator on Wayland. Note the yellow mark on status bar which controls screensharing on Gnome.

Pushed by robert.mader@posteo.de: https://hg.mozilla.org/integration/autoland/rev/2d2b7cda4aec Hide global webrtc privacy indicator on Wayland, r=emilio
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch

Should we call this out in the Fx117 relnotes?

Flags: needinfo?(robert.mader)

(In reply to Ryan VanderMeulen [:RyanVM] from comment #25)

Should we call this out in the Fx117 relnotes?

Yeah, it's probably worth a note.

Flags: needinfo?(robert.mader)

Please set the relnote-firefox? flag on the bug and fill out the form, in that case.

Flags: needinfo?(robert.mader)

Release Note Request (optional, but appreciated)
[Why is this notable]: The webrtc indicator has been a source of frustration for users using the Wayland backend. At the same time it's probably good to make people aware when removing a indicator/warning, for the unlikely case that they do rely on it.
[Affects Firefox for Android]: no
[Suggested wording]: Firefox does not show a screen sharing indicator on Wayland any more. It never worked as well as on other platforms and desktop environments typically provide sharing indicators already.
[Links (documentation, blog post, etc)]:

relnote-firefox: --- → ?
Flags: needinfo?(robert.mader)

Added to the Fx117 relnotes.

QA Whiteboard: [qa-117b-p2]
Duplicate of this bug: 1628431
See Also: → wayland-pip
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: