Bug 1414774 - Initialize sCSDCloseButton/sCSDMaximizeButton/sCSDMinimizeButton, r=jhorak
authorMartin Stransky <stransky@redhat.com>
Mon, 06 Nov 2017 11:41:38 +0100
changeset 443584 d45a801da041f29451d16646465587b4d9d0887f
parent 443583 749437068f048b341ffe50a6b29cdee4403ee3c4
child 443585 941d89fceb182f586ff18260c995a460a263f630
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjhorak
bugs1414774
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1414774 - Initialize sCSDCloseButton/sCSDMaximizeButton/sCSDMinimizeButton, r=jhorak MozReview-Commit-ID: 10Yk1gFu0Vk
widget/gtk/nsLookAndFeel.cpp
--- a/widget/gtk/nsLookAndFeel.cpp
+++ b/widget/gtk/nsLookAndFeel.cpp
@@ -1079,16 +1079,22 @@ nsLookAndFeel::EnsureInit()
     // Require GTK 3.20 for client-side decoration support.
     sCSDAvailable = gtk_check_version(3, 20, 0) == nullptr;
     if (sCSDAvailable) {
         sCSDAvailable =
             mozilla::Preferences::GetBool("widget.allow-client-side-decoration",
                                           false);
     }
 
+    // We need to initialize whole CSD config explicitly because it's queried
+    // as -moz-gtk* media features.
+    sCSDCloseButton = false;
+    sCSDMaximizeButton = false;
+    sCSDMinimizeButton = false;
+
     if (sCSDAvailable) {
         static auto sGtkHeaderBarGetDecorationLayoutPtr =
           (const gchar* (*)(GtkWidget*))
           dlsym(RTLD_DEFAULT, "gtk_header_bar_get_decoration_layout");
 
         GtkWidget* headerBar = GetWidget(MOZ_GTK_HEADER_BAR);
         const gchar* decorationLayout =
             sGtkHeaderBarGetDecorationLayoutPtr(headerBar);