mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-28 02:21:08 +00:00
DPMS: Don't wake display from input when timeouts are disabled
When DPMS is active, `mieqProcessInputEvents()` unconditionally switches the display back to `DPMSModeOn` for every input event. This prevents systems from keeping the display powered off while still allowing applications to use input devices when DPMS is externally managed by disabling all screen-saver and DPMS timeouts. When all screen-saver and DPMS timeouts are disabled, the current DPMS state is assumed to be externally managed and should not be overridden by input activity. Keep input processing unchanged so devices such as media buttons remain usable while the display is off. Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2287>
This commit is contained in:
parent
e19e86c29f
commit
975453b1aa
1 changed files with 7 additions and 1 deletions
|
|
@ -556,7 +556,13 @@ mieqProcessInputEvents(void)
|
|||
else if (DPMSPowerLevel != DPMSModeOn)
|
||||
SetScreenSaverTimer();
|
||||
|
||||
if (DPMSPowerLevel != DPMSModeOn)
|
||||
/* Only allow input activity to wake the display when an automatic
|
||||
* screen-saver or DPMS timeout is configured. If all timeouts are
|
||||
* disabled, the current DPMS state is assumed to be externally managed
|
||||
* and must not be overridden by input activity. */
|
||||
if (DPMSPowerLevel != DPMSModeOn &&
|
||||
(ScreenSaverTime > 0 || DPMSStandbyTime > 0 ||
|
||||
DPMSSuspendTime > 0 || DPMSOffTime > 0))
|
||||
DPMSSet(serverClient, DPMSModeOn);
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue