diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-07-03 14:50:32 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-07-03 15:26:15 +0200 |
commit | 222153af4406e74c9d8a8a752ae220663432905d (patch) | |
tree | 864fef700b80e5174a41df2cabda150c348298ba | |
parent | 7401a6691a9a3cd77431466b941eaf169c9b2b2c (diff) | |
download | nx-libs-222153af4406e74c9d8a8a752ae220663432905d.tar.gz nx-libs-222153af4406e74c9d8a8a752ae220663432905d.tar.bz2 nx-libs-222153af4406e74c9d8a8a752ae220663432905d.zip |
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: Peter Hutterer <peter.hutterer@who-t.net>
Backport-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
-rw-r--r-- | nx-X11/programs/Xserver/Xext/dpms.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/nx-X11/programs/Xserver/Xext/dpms.c b/nx-X11/programs/Xserver/Xext/dpms.c index 74969bb52..81bbd5179 100644 --- a/nx-X11/programs/Xserver/Xext/dpms.c +++ b/nx-X11/programs/Xserver/Xext/dpms.c @@ -232,19 +232,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; } |