aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/common/xf86DPMS.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xfree86/common/xf86DPMS.c')
-rw-r--r--xorg-server/hw/xfree86/common/xf86DPMS.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86DPMS.c b/xorg-server/hw/xfree86/common/xf86DPMS.c
index 3f1e142c7..881cb2773 100644
--- a/xorg-server/hw/xfree86/common/xf86DPMS.c
+++ b/xorg-server/hw/xfree86/common/xf86DPMS.c
@@ -36,6 +36,7 @@
#include <X11/X.h>
#include "os.h"
#include "globals.h"
+#include "windowstr.h"
#include "xf86.h"
#include "xf86Priv.h"
#ifdef DPMSExtension
@@ -159,7 +160,13 @@ DPMSSet(ClientPtr client, int level)
return Success;
if (level != DPMSModeOn) {
- rc = dixSaveScreens(client, SCREEN_SAVER_FORCER, ScreenSaverActive);
+ if (xf86IsUnblank(screenIsSaved)) {
+ rc = dixSaveScreens(client, SCREEN_SAVER_FORCER, ScreenSaverActive);
+ if (rc != Success)
+ return rc;
+ }
+ } else if (!xf86IsUnblank(screenIsSaved)) {
+ rc = dixSaveScreens(client, SCREEN_SAVER_FORCER, ScreenSaverReset);
if (rc != Success)
return rc;
}