diff --git a/src/qwaylandlayersurface.cpp b/src/qwaylandlayersurface.cpp index dd17aa0..e172b52 100644 --- a/src/qwaylandlayersurface.cpp +++ b/src/qwaylandlayersurface.cpp @@ -25,6 +25,10 @@ QWaylandLayerSurface::QWaylandLayerSurface(QWaylandLayerShell *shell, QtWaylandC wl_output *output = nullptr; QScreen *screen = interface->desiredOutput(); + if (!screen) { + screen = window->window()->screen(); + } + if (screen) { auto waylandScreen = dynamic_cast(screen->handle()); // Qt will always assign a screen to a window, but if the compositor has no screens available a dummy QScreen object is created