Skip to content

Commit

Permalink
wayland: avoid leaving the swapchain null on late displays
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxerski committed Jul 1, 2024
1 parent 13f9411 commit d1e4832
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/backend/Wayland.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ int Aquamarine::CWaylandBackend::drmFD() {
bool Aquamarine::CWaylandBackend::createOutput(const std::string& szName) {
auto o = outputs.emplace_back(SP<CWaylandOutput>(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<IOutput>(o)); });
return true;
}
Expand Down

0 comments on commit d1e4832

Please sign in to comment.