Commit f294e7a0 authored by Erik Kurzinger's avatar Erik Kurzinger

Call frameRendered for undamaged Wayland surfaces

Currently, if a Wayland surface registers a frame callback but does
not send a damage event, the callback will not be serviced even after
KWin has completed a compositing cycle and is therefore ready to
render a new frame for the surface. Since some clients, including any
using NVIDIA's Wayland EGL implementation, wait for frame events
before preparing each frame this behavior can result in hangs if a
compositing cycle occurs between registering the frame callback and
sending the damage event.

Instead, in accordance with the Wayland specification, frame callbacks
should be serviced (via KWayland::Server::SurfaceInterface::frameRendered)
for all visible windows - not just those damaged since the last
compositing cycle.
parent 18dd0327
......@@ -764,7 +764,7 @@ void Compositor::performCompositing()
m_timeSinceStart += m_timeSinceLastVBlank;
if (waylandServer()) {
for (Toplevel *win : qAsConst(damaged)) {
for (Toplevel *win : qAsConst(windows)) {
if (auto surface = win->surface()) {
surface->frameRendered(m_timeSinceStart);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment