diff options
Diffstat (limited to 'Xext/dpms.c')
-rw-r--r-- | Xext/dpms.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/Xext/dpms.c b/Xext/dpms.c index 8464f9e98..df63a8bf1 100644 --- a/Xext/dpms.c +++ b/Xext/dpms.c @@ -37,9 +37,7 @@ Equipment Corporation. #include "dixstruct.h" #include "extnsionst.h" #include "opaque.h" -#define DPMS_SERVER -#include <X11/extensions/dpms.h> -#include <X11/extensions/dpmsstr.h> +#include <X11/extensions/dpmsproto.h> #include "dpmsproc.h" #include "modinit.h" @@ -179,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; } |