From 30626fcebe0d68ac41281290715a1782a006de06 Mon Sep 17 00:00:00 2001 From: ganguin Date: Wed, 20 Apr 2022 09:32:08 +0000 Subject: [PATCH] Bug 1661450 - 6/8 Separate code for X11 and wayland r=stransky Depends on D139531 Differential Revision: https://phabricator.services.mozilla.com/D139532 --- widget/gtk/GtkCompositorWidget.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/widget/gtk/GtkCompositorWidget.cpp b/widget/gtk/GtkCompositorWidget.cpp index 89a8248bc0b9..07a12262af40 100644 --- a/widget/gtk/GtkCompositorWidget.cpp +++ b/widget/gtk/GtkCompositorWidget.cpp @@ -49,9 +49,20 @@ GtkCompositorWidget::GtkCompositorWidget( auto size = mClientSize.Lock(); *size = aInitData.InitialClientSize(); - LOG("GtkCompositorWidget::GtkCompositorWidget() [%p] mXWindow %p " - "mIsRenderingSuspended %d\n", - (void*)mWidget.get(), (void*)mXWindow, !!mIsRenderingSuspended); +#if defined(MOZ_X11) + if (GdkIsX11Display()) { + LOG("GtkCompositorWidget::GtkCompositorWidget() [%p] mXWindow %p " + "mIsRenderingSuspended %d\n", + (void*)mWidget.get(), (void*)mXWindow, !!mIsRenderingSuspended); + } +#endif +#if defined(MOZ_WAYLAND) + if (GdkIsWaylandDisplay()) { + LOG("GtkCompositorWidget::GtkCompositorWidget() [%p] mWidget %p " + "mIsRenderingSuspended %d\n", + (void*)mWidget.get(), (void*)mWidget, !!mIsRenderingSuspended); + } +#endif } GtkCompositorWidget::~GtkCompositorWidget() {