[PATCH 3/3] randr: deliver Output and Crtc events of attached output providers.

Michal Srb msrb at suse.com
Mon Oct 7 03:26:33 PDT 2013


Consider all attached output providers when looking for changed outputs and
crtcs.
---
 randr/randr.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/randr/randr.c b/randr/randr.c
index 9cec6f6..3c51427 100755
--- a/randr/randr.c
+++ b/randr/randr.c
@@ -478,6 +478,16 @@ TellChanged(WindowPtr pWin, pointer value)
                 if (crtc->changed)
                     RRDeliverCrtcEvent(client, pWin, crtc);
             }
+
+            xorg_list_for_each_entry(iter, &pScreen->output_slave_list, output_head) {
+                pSlaveScrPriv = rrGetScrPriv(iter);
+                for (i = 0; i < pSlaveScrPriv->numCrtcs; i++) {
+                    RRCrtcPtr crtc = pSlaveScrPriv->crtcs[i];
+
+                    if (crtc->changed)
+                        RRDeliverCrtcEvent(client, pWin, crtc);
+                }
+            }
         }
 
         if (pRREvent->mask & RROutputChangeNotifyMask) {
@@ -487,6 +497,16 @@ TellChanged(WindowPtr pWin, pointer value)
                 if (output->changed)
                     RRDeliverOutputEvent(client, pWin, output);
             }
+
+            xorg_list_for_each_entry(iter, &pScreen->output_slave_list, output_head) {
+                pSlaveScrPriv = rrGetScrPriv(iter);
+                for (i = 0; i < pSlaveScrPriv->numOutputs; i++) {
+                    RROutputPtr output = pSlaveScrPriv->outputs[i];
+
+                    if (output->changed)
+                        RRDeliverOutputEvent(client, pWin, output);
+                }
+            }
         }
 
         if (pRREvent->mask & RRProviderChangeNotifyMask) {
@@ -581,6 +601,10 @@ RRTellChanged(ScreenPtr pScreen)
         xorg_list_for_each_entry(iter, &master->output_slave_list, output_head) {
             pSlaveScrPriv = rrGetScrPriv(iter);
             pSlaveScrPriv->provider->changed = FALSE;
+            for (i = 0; i < pSlaveScrPriv->numOutputs; i++)
+                pSlaveScrPriv->outputs[i]->changed = FALSE;
+            for (i = 0; i < pSlaveScrPriv->numCrtcs; i++)
+                pSlaveScrPriv->crtcs[i]->changed = FALSE;
         }
         xorg_list_for_each_entry(iter, &master->offload_slave_list, offload_head) {
             pSlaveScrPriv = rrGetScrPriv(iter);
-- 
1.8.4



More information about the xorg-devel mailing list