Bug 1430018 - Unify GtkCompositorWidgetInitData() call for X11 and Wayland, r=jhorak
authorMartin Stransky <stransky@redhat.com>
Fri, 12 Jan 2018 10:43:31 +0100
changeset 453626 4cf0168d93c51f7bb6aeea5b46fa0647214a498e
parent 453625 15f4b0d4bae53daf7a087ecdc1f32fd1a9d57029
child 453627 7350873319faa1552949a9b4dd3bc3842e7d731f
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjhorak
bugs1430018
milestone59.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 1430018 - Unify GtkCompositorWidgetInitData() call for X11 and Wayland, r=jhorak MozReview-Commit-ID: 1sv3X59dMvZ
widget/gtk/nsWindow.cpp
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -6907,32 +6907,20 @@ nsWindow::GetCSDSupportLevel() {
 int32_t
 nsWindow::RoundsWidgetCoordinatesTo()
 {
     return GdkScaleFactor();
 }
 
 void nsWindow::GetCompositorWidgetInitData(mozilla::widget::CompositorWidgetInitData* aInitData)
 {
-#ifdef MOZ_X11
-#ifdef MOZ_WAYLAND
-  if (!mIsX11Display) {
-    *aInitData = mozilla::widget::GtkCompositorWidgetInitData(
-                                  (uintptr_t)nullptr,
-                                  nsCString(nullptr),
-                                  GetClientSize());
-  } else
-#endif
-  {
-    *aInitData = mozilla::widget::GtkCompositorWidgetInitData(
-                                  mXWindow,
-                                  nsCString(XDisplayString(mXDisplay)),
-                                  GetClientSize());
-  }
-#endif
+  *aInitData = mozilla::widget::GtkCompositorWidgetInitData(
+                                (mXWindow != X11None) ? mXWindow : (uintptr_t)nullptr,
+                                mXDisplay ? nsCString(XDisplayString(mXDisplay)) : nsCString(),
+                                GetClientSize());
 }
 
 bool
 nsWindow::IsComposited() const
 {
   if (!mGdkWindow) {
     NS_WARNING("nsWindow::HasARGBVisual called before realization!");
     return false;