diff options
Diffstat (limited to 'randr/rroutput.c')
-rw-r--r-- | randr/rroutput.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/randr/rroutput.c b/randr/rroutput.c index e00116283..1e1c914c4 100644 --- a/randr/rroutput.c +++ b/randr/rroutput.c @@ -331,6 +331,22 @@ RROutputSetPhysicalSize (RROutputPtr output, return TRUE; } +Bool +RROutputSetDPMS(RROutputPtr output, CARD16 level) +{ + ScreenPtr pScreen = output->pScreen; + + if (output->dpmsLevel != level) { + output->dpmsChanged = TRUE; + if (pScreen) { + rrScrPriv (pScreen); + pScrPriv->changed = TRUE; + } + } + output->dpmsLevel = level; + + return TRUE; +} void RRDeliverOutputEvent(ClientPtr client, WindowPtr pWin, RROutputPtr output) @@ -365,6 +381,21 @@ RRDeliverOutputEvent(ClientPtr client, WindowPtr pWin, RROutputPtr output) WriteEventsToClient (client, 1, (xEvent *) &oe); } +void +RRDeliverOutputDPMSEvent(ClientPtr client, WindowPtr pWin, RROutputPtr output) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + xRROutputDPMSChangeNotifyEvent oe; + + oe.type = RRNotify + RREventBase; + oe.subCode = RRNotify_OutputDPMSChange; + oe.sequenceNumber = client->sequence; + oe.window = pWin->drawable.id; + oe.output = output->id; + oe.level = output->dpmsLevel; + WriteEventsToClient (client, 1, (xEvent *) &oe); +} + /* * Destroy a Output at shutdown */ |