backends/wayland: Avoid attaching null buffer

Otherwise the window will be unmapped.
wilder/Plasma/6.2
Vlad Zahorodnii 2 years ago
parent 0b2596b604
commit ebe6f58d9a
  1. 10
      src/backends/wayland/wayland_egl_backend.cpp

@ -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…
Cancel
Save