backends/wayland: Avoid attaching null buffer
Otherwise the window will be unmapped.
This commit is contained in:
parent
0b2596b604
commit
ebe6f58d9a
1 changed files with 6 additions and 4 deletions
|
@ -129,11 +129,13 @@ void WaylandEglPrimaryLayer::present()
|
|||
{
|
||||
const auto waylandOutput = static_cast<WaylandOutput *>(m_output);
|
||||
KWayland::Client::Surface *surface = waylandOutput->surface();
|
||||
surface->attachBuffer(m_presentationBuffer);
|
||||
surface->damage(m_damageJournal.lastDamage());
|
||||
surface->setScale(std::ceil(waylandOutput->scale()));
|
||||
if (m_presentationBuffer) {
|
||||
surface->attachBuffer(m_presentationBuffer);
|
||||
surface->damage(m_damageJournal.lastDamage());
|
||||
surface->setScale(std::ceil(waylandOutput->scale()));
|
||||
m_presentationBuffer = nullptr;
|
||||
}
|
||||
surface->commit();
|
||||
m_presentationBuffer = nullptr;
|
||||
}
|
||||
|
||||
DrmDevice *WaylandEglPrimaryLayer::scanoutDevice() const
|
||||
|
|
Loading…
Reference in a new issue