summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2012-06-13 14:35:49 +0100
committerDave Airlie <airlied@redhat.com>2012-07-07 10:37:10 +0100
commit3cbc4c10b52896324fe14d2ab56bd54577c9294c (patch)
treef9e05c5affa108608ef6e3b5eeb6203f9df74cc2
parentd0e138c3f3e58ef127dad6c6aef48b1713b5ce58 (diff)
randr: expose unattached providers to the clients.
This provides the unattached provider list to the clients. Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--randr/rrprovider.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/randr/rrprovider.c b/randr/rrprovider.c
index db7074c40..aae309501 100644
--- a/randr/rrprovider.c
+++ b/randr/rrprovider.c
@@ -59,6 +59,7 @@ ProcRRGetProviders (ClientPtr client)
unsigned int extraLen;
RRProvider *providers;
int total_providers = 0, count_providers = 0;
+ ScreenPtr iter;
REQUEST_SIZE_MATCH(xRRGetProvidersReq);
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
@@ -71,6 +72,10 @@ ProcRRGetProviders (ClientPtr client)
if (pScrPriv->provider)
total_providers++;
+ xorg_list_for_each_entry(iter, &pScreen->unattached_list, unattached_head) {
+ pScrPriv = rrGetScrPriv(iter);
+ total_providers += pScrPriv->provider ? 1 : 0;
+ }
pScrPriv = rrGetScrPriv(pScreen);
rep.pad = 0;
@@ -100,6 +105,9 @@ ProcRRGetProviders (ClientPtr client)
providers = (RRProvider *)extra;
ADD_PROVIDER(pScreen);
+ xorg_list_for_each_entry(iter, &pScreen->unattached_list, unattached_head) {
+ ADD_PROVIDER(iter);
+ }
}
if (client->swapped) {