[PATCH] randr: add slave support to ProcRRSelectInput
Dave Airlie
airlied at gmail.com
Wed Jul 25 20:06:20 PDT 2012
From: Dave Airlie <airlied at redhat.com>
This needed to send events for the slave crtcs/outputs.
Pointed out by Keith.
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
randr/rrdispatch.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/randr/rrdispatch.c b/randr/rrdispatch.c
index 7fbc9f0..820c180 100644
--- a/randr/rrdispatch.c
+++ b/randr/rrdispatch.c
@@ -77,6 +77,8 @@ ProcRRSelectInput(ClientPtr client)
WindowPtr pWin;
RREventPtr pRREvent, *pHead;
XID clientResource;
+ ScreenPtr slave;
+ rrScrPrivPtr pSlavePriv;
int rc;
REQUEST_SIZE_MATCH(xRRSelectInputReq);
@@ -160,6 +162,12 @@ ProcRRSelectInput(ClientPtr client)
for (i = 0; i < pScrPriv->numCrtcs; i++) {
RRDeliverCrtcEvent(client, pWin, pScrPriv->crtcs[i]);
}
+ xorg_list_for_each_entry(slave, &pScreen->output_slave_list, output_head) {
+ pSlavePriv = rrGetScrPriv(slave);
+ for (i = 0; i < pSlavePriv->numCrtcs; i++) {
+ RRDeliverCrtcEvent(client, pWin, pSlavePriv->crtcs[i]);
+ }
+ }
}
if (pRREvent->mask & RROutputChangeNotifyMask) {
@@ -169,6 +177,12 @@ ProcRRSelectInput(ClientPtr client)
RRDeliverOutputEvent(client, pWin,
pScrPriv->outputs[i]);
}
+ xorg_list_for_each_entry(slave, &pScreen->output_slave_list, output_head) {
+ pSlavePriv = rrGetScrPriv(slave);
+ for (i = 0; i < pSlavePriv->numOutputs; i++) {
+ RRDeliverOutputEvent(client, pWin, pSlavePriv->outputs[i]);
+ }
+ }
}
/* We don't check for RROutputPropertyNotifyMask, as randrproto.txt doesn't
--
1.7.10.2
More information about the xorg-devel
mailing list