https://bugs.kde.org/show_bug.cgi?id=476962

Jakob Petsovits <jpe...@petsovits.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|                            |https://invent.kde.org/plas
                   |                            |ma/powerdevil/-/commit/c580
                   |                            |85b4ca3cf5456dd7cdfa4189d06
                   |                            |b38a3e488
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #12 from Jakob Petsovits <jpe...@petsovits.com> ---
Git commit c58085b4ca3cf5456dd7cdfa4189d06b38a3e488 by Jakob Petsovits.
Committed on 05/01/2024 at 02:39.
Pushed by jpetso into branch 'master'.

actions/bundled/dpms: Handle very short timeout-when-locked better

For automatic display turn-off, we now allow setting an idle timeout
when the screen is locked, down to 0 seconds. This makes sense when
the session transitions from unlocked to locked, allowing the user to
turn off the display at the same time as the lockscreen would appear.

Unfortunately, it doesn't work for a 0 second timeout. The issue is
that low timeout values also affect user interaction on wakeup,
i.e. when trying to enter the password the user now has 0 seconds
available to type their password. This prevents us from simply
removing the check for >0 seconds when registering DPMS timeouts.

Instead, this commit splits the timeout when locked into two internal
member variables.

For the traditional "timeout when locked" value, we now apply a
(hardcoded) minimum duration to allow uninterrupted authentication
when the lock screen is already active.

In addition, we introduce a new "timeout when activating lock" value
that uses the configured value as is (more or less - applying an
extremely short minimum may help prevent unintended behavior).
This new timeout only gets used when switching from unlocked
to locked, and is replaced by the regular "timeout when locked"
thereafter until the session gets unlocked again.

Suspend/resume handling receives some extra care to behave well.
Unlocked timeouts also apply a minimum duration for extra safety.

M  +52   -16   daemon/actions/bundled/dpms.cpp
M  +8    -3    daemon/actions/bundled/dpms.h
M  +6    -1    daemon/powerdevilaction.cpp
M  +6    -0    daemon/powerdevilaction.h

https://invent.kde.org/plasma/powerdevil/-/commit/c58085b4ca3cf5456dd7cdfa4189d06b38a3e488

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to