From c997602a070cb46ecab4f8e857dc6f27f8d6ca5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Wed, 25 Jan 2023 16:52:59 +0000 Subject: [PATCH] Bug 1812289 - Enable CSD titlebar more by default. r=stransky It works well on KDE and others, so try to enable it unconditionally for consistency, specially given stuff like the native titlebar context menu etc works (bug 1771950). Now that the titlebar setting is a tri-state, the hidden pref doesn't make particular sense either, browser.tabs.inTitlebar=1 would have the same effect. Differential Revision: https://phabricator.services.mozilla.com/D167796 --- widget/gtk/nsLookAndFeel.cpp | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/widget/gtk/nsLookAndFeel.cpp b/widget/gtk/nsLookAndFeel.cpp index 0b4b71a75de3..a7a9db5f3c1e 100644 --- a/widget/gtk/nsLookAndFeel.cpp +++ b/widget/gtk/nsLookAndFeel.cpp @@ -2075,25 +2075,7 @@ char16_t nsLookAndFeel::GetPasswordCharacterImpl() { bool nsLookAndFeel::GetEchoPasswordImpl() { return false; } -bool nsLookAndFeel::GetDefaultDrawInTitlebar() { - static bool drawInTitlebar = []() { - // When user defined widget.default-hidden-titlebar don't do any - // heuristics and just follow it. - if (Preferences::HasUserValue("widget.default-hidden-titlebar")) { - return Preferences::GetBool("widget.default-hidden-titlebar", false); - } - - // Don't hide titlebar when it's disabled on current desktop. - if (!sCSDAvailable) { - return false; - } - - // We hide system titlebar on Gnome/ElementaryOS without any restriction. - return IsGnomeDesktopEnvironment() || - FindInReadable("pantheon"_ns, GetDesktopEnvironmentIdentifier()); - }(); - return drawInTitlebar; -} +bool nsLookAndFeel::GetDefaultDrawInTitlebar() { return sCSDAvailable; } void nsLookAndFeel::GetThemeInfo(nsACString& aInfo) { aInfo.Append(mSystemTheme.mName);