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
This commit is contained in:
Martin Stransky 2017-12-11 11:07:48 +01:00
Родитель e17f64f2b6
Коммит 5824a507e6
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -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;