mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-30 21:20:08 +01:00
Don't reset the lastDeviceEventTime when doing DPMS actions
When we change the DPMS mode, don't play games with the last event time as
this breaks applications using IDLETIME to turn the backlight off after a
preset time.
This patch fixes gnome-power-manager and xfce-power-manager
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit c1d901d723)
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
3044711412
commit
468787bdd2
1 changed files with 4 additions and 13 deletions
17
Xext/dpms.c
17
Xext/dpms.c
|
|
@ -219,19 +219,10 @@ ProcDPMSForceLevel(client)
|
|||
if (!DPMSEnabled)
|
||||
return BadMatch;
|
||||
|
||||
if (stuff->level == DPMSModeOn) {
|
||||
lastDeviceEventTime.milliseconds =
|
||||
GetTimeInMillis();
|
||||
} else if (stuff->level == DPMSModeStandby) {
|
||||
lastDeviceEventTime.milliseconds =
|
||||
GetTimeInMillis() - DPMSStandbyTime;
|
||||
} else if (stuff->level == DPMSModeSuspend) {
|
||||
lastDeviceEventTime.milliseconds =
|
||||
GetTimeInMillis() - DPMSSuspendTime;
|
||||
} else if (stuff->level == DPMSModeOff) {
|
||||
lastDeviceEventTime.milliseconds =
|
||||
GetTimeInMillis() - DPMSOffTime;
|
||||
} else {
|
||||
if (stuff->level != DPMSModeOn &&
|
||||
stuff->level != DPMSModeStandby &&
|
||||
stuff->level != DPMSModeSuspend &&
|
||||
stuff->level != DPMSModeOff) {
|
||||
client->errorValue = stuff->level;
|
||||
return BadValue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue