mirror of
https://github.com/hyprwm/aquamarine.git
synced 2024-11-17 03:46:00 +01:00
wayland: avoid leaving the swapchain null on late displays
This commit is contained in:
parent
13f94112aa
commit
d1e48322ed
1 changed files with 2 additions and 0 deletions
|
@ -137,6 +137,8 @@ int Aquamarine::CWaylandBackend::drmFD() {
|
||||||
bool Aquamarine::CWaylandBackend::createOutput(const std::string& szName) {
|
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)));
|
auto o = outputs.emplace_back(SP<CWaylandOutput>(new CWaylandOutput(szName.empty() ? std::format("WAYLAND-{}", ++lastOutputID) : szName, self)));
|
||||||
o->self = o;
|
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)); });
|
idleCallbacks.emplace_back([this, o]() { backend->events.newOutput.emit(SP<IOutput>(o)); });
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue