diff options
Diffstat (limited to 'xrandr.c')
-rw-r--r-- | xrandr.c | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -46,6 +46,7 @@ static int screen = -1; static Bool verbose = False; static Bool automatic = False; static Bool properties = False; +static Bool providers = False; static Bool grab_server = True; static Bool no_primary = False; @@ -143,6 +144,7 @@ usage(void) fprintf(stderr, " --rmmode <name>\n"); fprintf(stderr, " --addmode <output> <name>\n"); fprintf(stderr, " --delmode <output> <name>\n"); + fprintf(stderr, " --listprovider\n"); exit(1); /*NOTREACHED*/ @@ -2652,6 +2654,13 @@ main (int argc, char **argv) action_requested = True; continue; } + if (!strcmp ("--listproviders", argv[i])) + { + query_1_2 = True; + providers = True; + action_requested = True; + continue; + } usage(); } if (!action_requested) @@ -3154,6 +3163,21 @@ main (int argc, char **argv) } } + if (providers) + { + XRRProviderResources *providers; + providers = XRRGetProviderResources(dpy, root); + if (providers) { + printf("Providers: number : %d\n", providers->nproviders); + + for (j = 0; j < providers->nproviders; j++) { + XRRProviderInfo *info = XRRGetProviderInfo(dpy, providers->providers[j]); + printf("Provider %d: %d %x %x %d %d\n", j, (int)providers->providers[j], info->current_role, info->allowed_roles, info->ncrtcs, info->noutputs); + XRRFreeProviderInfo(info); + } + } + + } if (verbose) { for (j = 0; j < output_info->nmode; j++) |