Skip to content

libdpms: Guarantee validity of isSupported() right after construction

CCBUG: 338796

This reverts commit c37450e1 (a.k.a. MR !174 (merged)), which fixed turning off the screen on Esc when locked, but broke some DPMS-related functions in PowerDevil, e.g. visibility of display turn-off timeouts in the "Energy Saving" KCM.

As a slight change from before though, this does not reintroduce the incorrect API docs statement that isSupported() would block while initializing. Callers can avoid the use of supportedChanged with a good conscience now, unless they track its state over time.

CC @ngraham, @davidedmundson

Meant to go together with kscreenlocker!176 (merged) which will re-fix pressing Esc to turn off the display.

Edited by Jakob Petsovits

Merge request reports