aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nx-X11/programs/Xserver/Xext/dpms.c17
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;
}