[plasma/kwin/Plasma/6.7] src/scene: scene/windowitem: also set suspended state for dpms off

Xaver Hugl <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit cef4f85b99d1f1e96e739e9a58c430f94a80a802 by Xaver Hugl.
Committed on 27/07/2026 at 11:43.
Pushed by zamundaaa into branch 'Plasma/6.7'.

scene/windowitem: also set suspended state for dpms off

Rendering with the screen off is usually just a big waste of power.

(cherry picked from commit bb3d6d12440180a0502fb124bec00e6f36d0b80b)

M  +3    -1    src/scene/windowitem.cpp

https://invent.kde.org/plasma/kwin/-/commit/cef4f85b99d1f1e96e739e9a58c430f94a80a802

diff --git a/src/scene/windowitem.cpp b/src/scene/windowitem.cpp
index e20c71cc6fd..a530063dbcb 100644
--- a/src/scene/windowitem.cpp
+++ b/src/scene/windowitem.cpp
@@ -53,6 +53,7 @@ WindowItem::WindowItem(Window *window, Item *parent)
     connect(waylandServer(), &WaylandServer::lockStateChanged, this, &WindowItem::updateVisibility);
     connect(workspace(), &Workspace::currentActivityChanged, this, &WindowItem::updateVisibility);
     connect(workspace(), &Workspace::currentDesktopChanged, this, &WindowItem::updateVisibility);
+    connect(workspace(), &Workspace::dpmsStateChanged, this, &WindowItem::updateVisibility);
     updateVisibility();
 
     connect(window, &Window::opacityChanged, this, &WindowItem::updateOpacity);
@@ -197,7 +198,8 @@ void WindowItem::updateVisibility()
     setVisible(visible);
 
     if (m_window->readyForPainting()) {
-        m_window->setSuspended(!visible && !m_window->isOffscreenRendering());
+        const bool dpmsOff = workspace()->dpmsState() != Workspace::DpmsState::On;
+        m_window->setSuspended((!visible || dpmsOff) && !m_window->isOffscreenRendering());
     }
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.