Skip to content

actions/dimdisplay: Don't dim when screen changes are inhibited

Cherry-pick to Plasma/6.0 of MR !344 (merged), including both its main commit and the extra logging improvement commit.


DimDisplay::onIdleTimeout() may not force "Explicit" when triggering the action manually, but it will still record old screen & keyboard brightness values regardless of policy and set m_dimmed to true. We should always do either one or the other.

Hence, track the ChangeScreenSettings policy state within DimDisplay and use that to skip all of onIdleTimeout() if currently inhibiting. As per GitLab issue #29, we're better off without "Explicit" here.

Modeled after the DPMS action which has similar policy tracking code.

(cherry picked from commit 2f2ec7c9)

Merge request reports