Skip to content
Commit e9c984a7 authored by Jakob Petsovits's avatar Jakob Petsovits
Browse files

actions/bundled/dpms: Less fragile code for pre-turn-off fading

Simplifies the code for better readability.

Also solves an issue on X11 when an activating screen locker
reduces the idle timeout, or for idle timeouts shorter than the
hardcoded 5 second fade-out grace period. In either of these cases,
both the fade and action timeouts would be signaled immediately
after one another, but in the wrong order. The observed effect was
that the screen turned off first, the user moves their mouse to
avoid locking, and the screen comes back on but fades out anyway.

The refactored version avoids these kinds of race conditions by
simply connecting the turn-off action to the screen helper's fadedOut
signal, or in case of Wayland, directly to the timeout like before.
No hardcoded fade-out times are necessary anymore.
parent 4ebce4b6
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment