Commit 222153af authored by Mike Gabriel's avatar Mike Gabriel

Don't reset the lastDeviceEventTime when doing DPMS actions

Backported from X.org's Xserver: commit c1d901d723c3bee523736eacc15b44a7dff484fe Author: Richard Hughes <richard@hughsie.com> Date: Fri Aug 14 11:44:35 2009 +0100 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: 's avatarPeter Hutterer <peter.hutterer@who-t.net> Backport-to-NX-by: 's avatarMike Gabriel <mike.gabriel@das-netzwerkteam.de>
parent 7401a669
...@@ -232,19 +232,10 @@ ProcDPMSForceLevel(client) ...@@ -232,19 +232,10 @@ ProcDPMSForceLevel(client)
if (!DPMSEnabled) if (!DPMSEnabled)
return BadMatch; return BadMatch;
if (stuff->level == DPMSModeOn) { if (stuff->level != DPMSModeOn &&
lastDeviceEventTime.milliseconds = stuff->level != DPMSModeStandby &&
GetTimeInMillis(); stuff->level != DPMSModeSuspend &&
} else if (stuff->level == DPMSModeStandby) { stuff->level != DPMSModeOff) {
lastDeviceEventTime.milliseconds =
GetTimeInMillis() - DPMSStandbyTime;
} else if (stuff->level == DPMSModeSuspend) {
lastDeviceEventTime.milliseconds =
GetTimeInMillis() - DPMSSuspendTime;
} else if (stuff->level == DPMSModeOff) {
lastDeviceEventTime.milliseconds =
GetTimeInMillis() - DPMSOffTime;
} else {
client->errorValue = stuff->level; client->errorValue = stuff->level;
return BadValue; return BadValue;
} }
......
Markdown is supported
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