From d1e48322ed4320bcec8cbeab34c6d2ff153def29 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Mon, 1 Jul 2024 14:59:16 +0200 Subject: [PATCH] wayland: avoid leaving the swapchain null on late displays --- src/backend/Wayland.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/backend/Wayland.cpp b/src/backend/Wayland.cpp index ab99f8c..c4e38b6 100644 --- a/src/backend/Wayland.cpp +++ b/src/backend/Wayland.cpp @@ -137,6 +137,8 @@ int Aquamarine::CWaylandBackend::drmFD() { bool Aquamarine::CWaylandBackend::createOutput(const std::string& szName) { auto o = outputs.emplace_back(SP(new CWaylandOutput(szName.empty() ? std::format("WAYLAND-{}", ++lastOutputID) : szName, self))); o->self = o; + if (backend->ready) + o->swapchain = CSwapchain::create(backend->allocator, self.lock()); idleCallbacks.emplace_back([this, o]() { backend->events.newOutput.emit(SP(o)); }); return true; }