summaryrefslogtreecommitdiff
path: root/xserver/hw/dmx/dmxscrinit.c
diff options
context:
space:
mode:
Diffstat (limited to 'xserver/hw/dmx/dmxscrinit.c')
-rw-r--r--xserver/hw/dmx/dmxscrinit.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/xserver/hw/dmx/dmxscrinit.c b/xserver/hw/dmx/dmxscrinit.c
index e441dceef..ae095e300 100644
--- a/xserver/hw/dmx/dmxscrinit.c
+++ b/xserver/hw/dmx/dmxscrinit.c
@@ -75,6 +75,17 @@ DevPrivateKeyRec dmxColormapPrivateKeyRec;
DevPrivateKeyRec dmxPictPrivateKeyRec;
DevPrivateKeyRec dmxGlyphSetPrivateKeyRec;
+#ifdef DPMSExtension
+static void
+dmxDPMS(ScreenPtr pScreen, int level)
+{
+ DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
+ dmxDPMSBackend(dmxScreen, level);
+}
+#else
+#define dmxDPMS NULL
+#endif
+
/** Initialize the parts of screen \a idx that require access to the
* back-end server. */
void
@@ -103,7 +114,8 @@ dmxBEScreenInit(ScreenPtr pScreen)
pScreen->blackPixel = dmxScreen->beBlackPixel;
/* Handle screen savers and DPMS on the backend */
- dmxDPMSInit(dmxScreen);
+ if (dmxDPMSInit(dmxScreen))
+ pScreen->DPMS = dmxDPMS;
/* Create root window for screen */
mask = CWBackPixel | CWEventMask | CWColormap | CWOverrideRedirect;