From 4dca9c9005ccae0a81f2e7eec3456f437d0f737d Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Fri, 12 Jun 2009 14:46:25 -0500 Subject: [PATCH] bfo#21760 - Send events that were missing from RRSelectInput The RANDR spec (randrproto.txt) specifies that RRSelectInput will send out events corresponding to the event mask, if there have been changes to CRTCs or outputs. Only screen events were being generated, however. Signed-off-by: Federico Mena Quintero --- randr/rrdispatch.c | 32 ++++++++++++++++++++++++++++++-- 1 files changed, 30 insertions(+), 2 deletions(-) diff --git a/randr/rrdispatch.c b/randr/rrdispatch.c index bec5b08..52bbcb3 100644 --- a/randr/rrdispatch.c +++ b/randr/rrdispatch.c @@ -142,7 +142,7 @@ ProcRRSelectInput (ClientPtr client) /* * Now see if the client needs an event */ - if (pScrPriv && (pRREvent->mask & RRScreenChangeNotifyMask)) + if (pScrPriv) { pTimes = &((RRTimesPtr) (pRRClient + 1))[pScreen->myNum]; if (CompareTimeStamps (pTimes->setTime, @@ -150,7 +150,35 @@ ProcRRSelectInput (ClientPtr client) CompareTimeStamps (pTimes->configTime, pScrPriv->lastConfigTime) != 0) { - RRDeliverScreenEvent (client, pWin, pScreen); + if (pRREvent->mask & RRScreenChangeNotifyMask) + { + RRDeliverScreenEvent (client, pWin, pScreen); + } + + if (pRREvent->mask & RRCrtcChangeNotifyMask) + { + int i; + + for (i = 0; i < pScrPriv->numCrtcs; i++) + { + RRDeliverCrtcEvent (client, pWin, pScrPriv->crtcs[i]); + } + } + + if (pRREvent->mask & RROutputChangeNotifyMask) + { + int i; + + for (i = 0; i < pScrPriv->numOutputs; i++) + { + RRDeliverOutputEvent (client, pWin, pScrPriv->outputs[i]); + } + } + + /* We don't check for RROutputPropertyNotifyMask, as randrproto.txt doesn't + * say if there ought to be notifications of changes to output properties + * if those changes occurred before the time RRSelectInput is called. + */ } } } -- 1.6.0.2