From 1c02893dc9c5025dc82621d4c657f30f8439b73a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 7 Dec 2017 15:20: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: 6OzoPyxlhCp --HG-- extra : rebase_source : 9bcfc96cd27cb088f8d9671780304c2ac3772fdf --- 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 a6a84063c1ee..b2475d08e2c2 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;