diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index 412c0c7fb826..eff419e7cdbd 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -4745,6 +4745,18 @@ int XREMain::XRE_mainStartup(bool* aExitFlag) { else { gdk_display_manager_open_display(gdk_display_manager_get(), nullptr); } +# endif + // Check that Wayland only and X11 only builds + // use appropriate displays. +# if defined(MOZ_WAYLAND) && !defined(MOZ_X11) + if (!GdkIsWaylandDisplay()) { + Output(true, "Wayland only build is missig Wayland display!\n"); + } +# endif +# if !defined(MOZ_WAYLAND) && defined(MOZ_X11) + if (!GdkIsX11Display()) { + Output(true, "X11 only build is missig X11 display!\n"); + } # endif } #endif