summaryrefslogtreecommitdiff
path: root/Xext/dpms.c
diff options
context:
space:
mode:
Diffstat (limited to 'Xext/dpms.c')
-rw-r--r--Xext/dpms.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/Xext/dpms.c b/Xext/dpms.c
index 0723c4694..54871c575 100644
--- a/Xext/dpms.c
+++ b/Xext/dpms.c
@@ -188,12 +188,15 @@ static int
ProcDPMSEnable(client)
ClientPtr client;
{
- /* REQUEST(xDPMSEnableReq); */
+ Bool was_enabled = DPMSEnabled;
REQUEST_SIZE_MATCH(xDPMSEnableReq);
- if (DPMSCapableFlag)
+ if (DPMSCapableFlag) {
DPMSEnabled = TRUE;
+ if (!was_enabled)
+ SetScreenSaverTimer();
+ }
return(client->noClientException);
}