diff --git a/src/backends/wayland/wayland_backend.cpp b/src/backends/wayland/wayland_backend.cpp index e5bb7ce608..dd4627e406 100644 --- a/src/backends/wayland/wayland_backend.cpp +++ b/src/backends/wayland/wayland_backend.cpp @@ -823,8 +823,6 @@ WaylandOutput *WaylandBackend::createOutput(const QString &name, const QPoint &p waylandOutput->init(position, size); connect(waylandOutput, &WaylandOutput::frameRendered, this, [waylandOutput]() { - waylandOutput->resetRendered(); - // The current time of the monotonic clock is a pretty good estimate when the frame // has been presented, however it will be much better if we check whether the host // compositor supports the wp_presentation protocol. diff --git a/src/backends/wayland/wayland_output.cpp b/src/backends/wayland/wayland_output.cpp index a1208f1f57..8478f3f30c 100644 --- a/src/backends/wayland/wayland_output.cpp +++ b/src/backends/wayland/wayland_output.cpp @@ -36,10 +36,7 @@ WaylandOutput::WaylandOutput(const QString &name, Surface *surface, WaylandBacke .capabilities = Capability::Dpms, }); - connect(surface, &Surface::frameRendered, this, [this] { - m_rendered = true; - Q_EMIT frameRendered(); - }); + connect(surface, &Surface::frameRendered, this, &WaylandOutput::frameRendered); m_turnOffTimer.setSingleShot(true); m_turnOffTimer.setInterval(dimAnimationTime()); connect(&m_turnOffTimer, &QTimer::timeout, this, [this] { diff --git a/src/backends/wayland/wayland_output.h b/src/backends/wayland/wayland_output.h index 53806e0c22..1aea3d0a22 100644 --- a/src/backends/wayland/wayland_output.h +++ b/src/backends/wayland/wayland_output.h @@ -70,15 +70,6 @@ public: return m_surface; } - bool rendered() const - { - return m_rendered; - } - void resetRendered() - { - m_rendered = false; - } - void updateEnablement(bool enable) override; void setDpmsMode(DpmsMode mode) override; @@ -97,8 +88,6 @@ private: KWayland::Client::Surface *m_surface; WaylandBackend *m_backend; QTimer m_turnOffTimer; - - bool m_rendered = false; }; class XdgShellOutput : public WaylandOutput