diff options
Diffstat (limited to 'randr/randr.c')
-rw-r--r-- | randr/randr.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/randr/randr.c b/randr/randr.c index 958f9c192..85ff587eb 100644 --- a/randr/randr.c +++ b/randr/randr.c @@ -176,6 +176,18 @@ SRROutputPropertyNotifyEvent(xRROutputPropertyNotifyEvent *from, } static void +SRROutputDPMSChangeNotifyEvent(xRROutputDPMSChangeNotifyEvent *from, + xRROutputDPMSChangeNotifyEvent *to) +{ + to->type = from->type; + to->subCode = from->subCode; + cpswaps(from->sequenceNumber, to->sequenceNumber); + cpswapl(from->window, to->window); + cpswapl(from->output, to->output); + cpswaps(from->level, to->level); +} + +static void SRRNotifyEvent (xEvent *from, xEvent *to) { @@ -192,6 +204,10 @@ SRRNotifyEvent (xEvent *from, SRROutputPropertyNotifyEvent ((xRROutputPropertyNotifyEvent *) from, (xRROutputPropertyNotifyEvent *) to); break; + case RRNotify_OutputDPMSChange: + SRROutputDPMSChangeNotifyEvent((xRROutputDPMSChangeNotifyEvent *) from, + (xRROutputDPMSChangeNotifyEvent *) to); + break; default: break; } @@ -404,6 +420,15 @@ TellChanged (WindowPtr pWin, pointer value) RRDeliverOutputEvent (client, pWin, output); } } + if (pRREvent->mask & RROutputDPMSChangeNotifyMask) + { + for (i = 0; i < pScrPriv->numOutputs; i++) + { + RROutputPtr output = pScrPriv->outputs[i]; + if (output->dpmsChanged) + RRDeliverOutputDPMSEvent (client, pWin, output); + } + } } return WT_WALKCHILDREN; } |