From f294e7a035675b402e9b3a217c961b3a3704ab0d Mon Sep 17 00:00:00 2001 From: Erik Kurzinger Date: Tue, 29 Jan 2019 12:37:17 -0800 Subject: [PATCH] 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. --- composite.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composite.cpp b/composite.cpp index a5341460b6..5551210b83 100644 --- a/composite.cpp +++ b/composite.cpp @@ -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); }