mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-10 17:30:18 +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>
This commit is contained in:
parent
dca4de72d3
commit
c1d901d723
1 changed files with 4 additions and 13 deletions
17
Xext/dpms.c
17
Xext/dpms.c
|
|
@ -177,19 +177,10 @@ ProcDPMSForceLevel(ClientPtr 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