[PATCH 14/36] randr: expose unattached providers to the clients.
Dave Airlie
airlied at gmail.com
Mon Jul 2 03:13:07 PDT 2012
From: Dave Airlie <airlied at redhat.com>
This provides the unattached provider list to the clients.
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
randr/rrprovider.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/randr/rrprovider.c b/randr/rrprovider.c
index 5797431..c019e91 100644
--- a/randr/rrprovider.c
+++ b/randr/rrprovider.c
@@ -58,6 +58,7 @@ ProcRRGetProviders (ClientPtr client)
RRProvider *providers;
int flags = 0;
int total_providers = 0, count_providers = 0;
+ ScreenPtr iter;
REQUEST_SIZE_MATCH(xRRGetProvidersReq);
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
@@ -70,6 +71,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;
@@ -102,6 +107,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) {
--
1.7.10.2
More information about the xorg-devel
mailing list