Wayland: Disable Firefox' webrtc indicator and rely on the desktop environment's screensharing indicator (was: Implement nsISystemStatusBar)
Categories
(Core :: Widget: Gtk, enhancement, P3)
Tracking
()
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.
Reporter | ||
Comment 1•4 years ago
|
||
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.
Updated•4 years ago
|
Comment 2•4 years ago
|
||
We should rather use GNotification (https://developer.gnome.org/gio/stable/GNotification.html) as GtkStatusIcon is deprecated.
Comment 3•4 years ago
|
||
OTOH I'm not sure if GNotification can be used for the indicator so we may need to use GtkStatusIcon anyway.
Comment 4•3 years ago
|
||
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...
Reporter | ||
Comment 5•2 years ago
|
||
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?
Comment 6•2 years ago
|
||
(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.
Comment 7•2 years ago
|
||
IIUC, always-on-top (bug 1621261) and sticking-to-the-top are not possible on Wayland for security reasons.
Updated•2 years ago
|
Updated•2 years ago
|
Comment 8•1 years ago
|
||
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)
Comment 9•1 years ago
|
||
Gnome does the same thing. As sharing is managed by OS we don't need extra indicator created by Firefox on Wayland.
Comment 10•1 years ago
|
||
We should disable WebRTC indicator on Wayland environment where pipewire is used:
https://searchfox.org/mozilla-central/rev/aec3a901e6f6b3041b5ec457c9111a042cef1fb1/third_party/libwebrtc/modules/desktop_capture/desktop_capturer.cc#132
Comment 11•1 years ago
|
||
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.
Comment 12•1 years ago
|
||
privacy.webrtc.hideGlobalIndicator=true
We just need to find out if Sway shows a pipewire indicator as well or not.
Updated•1 years ago
|
Assignee | ||
Comment 14•1 years ago
|
||
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.
Reporter | ||
Comment 15•1 years ago
|
||
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.
Updated•1 years ago
|
Updated•1 year ago
|
Assignee | ||
Comment 18•1 year ago
|
||
(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).
Comment 19•1 year ago
|
||
Robert, do you mind to create a patch for it?
Thanks.
Assignee | ||
Comment 20•1 year ago
|
||
(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 | ||
Updated•1 year ago
|
Assignee | ||
Comment 21•1 year ago
|
||
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.
Comment 22•1 year ago
|
||
Screen sharing indicator on Wayland. Note the yellow mark on status bar which controls screensharing on Gnome.
Comment 23•1 year ago
|
||
Comment 24•1 year ago
|
||
bugherder |
Comment 25•1 year ago
|
||
Should we call this out in the Fx117 relnotes?
Assignee | ||
Comment 26•1 year ago
|
||
(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.
Comment 27•1 year ago
|
||
Please set the relnote-firefox?
flag on the bug and fill out the form, in that case.
Assignee | ||
Comment 28•1 year ago
|
||
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)]:
Updated•1 year ago
|
Updated•1 year ago
|
Description
•