diff --git a/browser/base/content/webrtcIndicator.js b/browser/base/content/webrtcIndicator.js index 90c16de9b352..765c75c03134 100644 --- a/browser/base/content/webrtcIndicator.js +++ b/browser/base/content/webrtcIndicator.js @@ -73,10 +73,9 @@ const WebRTCIndicator = { false ); - this.hideGlobalIndicator = Services.prefs.getBoolPref( - "privacy.webrtc.hideGlobalIndicator", - false - ); + this.hideGlobalIndicator = + Services.prefs.getBoolPref("privacy.webrtc.hideGlobalIndicator", false) || + Services.appinfo.isWayland; if (this.hideGlobalIndicator) { this.setVisibility(false); diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index d67db6918b42..67ae06bd0a64 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -1619,6 +1619,16 @@ nsXULAppInfo::GetDesktopEnvironment(nsACString& aDesktopEnvironment) { return NS_OK; } +NS_IMETHODIMP +nsXULAppInfo::GetIsWayland(bool* aResult) { +#ifdef MOZ_WIDGET_GTK + *aResult = GdkIsWaylandDisplay(); +#else + *aResult = false; +#endif + return NS_OK; +} + NS_IMETHODIMP nsXULAppInfo::GetProcessStartupShortcut(nsAString& aShortcut) { #if defined(XP_WIN) diff --git a/xpcom/system/nsIXULRuntime.idl b/xpcom/system/nsIXULRuntime.idl index e679bf74c5d5..8beadae9f102 100644 --- a/xpcom/system/nsIXULRuntime.idl +++ b/xpcom/system/nsIXULRuntime.idl @@ -342,6 +342,9 @@ interface nsIXULRuntime : nsISupports /** Returns the desktop environment identifier. Only meaningful on GTK */ readonly attribute ACString desktopEnvironment; + /** Whether we use Wayland. Only meaningful on GTK */ + readonly attribute boolean isWayland; + /** * The path of the shortcut used to start the current process, or "" if none. *