From 5824a507e608a19cf873db291cdab058f59321ce Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 11 Dec 2017 11:07:48 +0100 Subject: [PATCH] Bug 1423869 - don't draw to mContainer when decorations are rendered by window manager, r=jhorak Bug 1421974 introduced new mechanism to hide system titlebar by enabling client-side decorations for main Firefox window. It also causes a regression when the CSD window setup is enabled when system titlebar is hidden by window manager. This patch fixes that and enables the CSD window setup only for case when it's actualy used. MozReview-Commit-ID: AqfHR2bGr3K --HG-- extra : rebase_source : 625366530922872af82e182db10f5069ebfa7dc4 --- widget/gtk/nsWindow.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp index c89b04f8c186..8ac26e7751ae 100644 --- a/widget/gtk/nsWindow.cpp +++ b/widget/gtk/nsWindow.cpp @@ -3795,8 +3795,9 @@ nsWindow::Create(nsIWidget* aParent, * and we listen to the Gtk+ events on mContainer. */ GtkStyleContext* style = gtk_widget_get_style_context(mShell); - drawToContainer = mIsCSDAvailable || - gtk_style_context_has_class(style, "csd"); + drawToContainer = + (mIsCSDAvailable && GetCSDSupportLevel() == CSD_SUPPORT_FLAT ) || + gtk_style_context_has_class(style, "csd"); #endif eventWidget = (drawToContainer) ? container : mShell;