Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.1:Staging:A
xrandr
xrandr-print-outputs-per-provider.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File xrandr-print-outputs-per-provider.patch of Package xrandr
diff --git a/xrandr.c b/xrandr.c index e08a7d6..46e5763 100644 --- a/xrandr.c +++ b/xrandr.c @@ -2541,6 +2541,52 @@ find_provider (name_t *name) exit (1); } +static void +print_providers (Bool current) +{ + int k; + + if (!has_1_4) { + printf ("RandR 1.4 not supported\n"); + exit (0); + } + + get_screen (current); + get_crtcs (); + get_outputs (); + get_providers (); + + if (providers) { + int j; + int i; + + printf("Providers: number : %d\n", num_providers); + + for (j = 0; j < num_providers; j++) { + provider_t *provider = &providers[j]; + XRRProviderInfo *info = provider->info; + + printf("Provider %d: id: 0x%x; cap: 0x%x (", j, (int)provider->provider.xid, info->capabilities); + for (k = 0; k < 4; k++) + if (info->capabilities & (1 << k)) { + printf("%s", capability_name(1<<k)); + if ((info->capabilities & (0xff << (k + 1))) != 0) + printf (", "); + } + printf (");"); + + printf(" crtcs: %d; outputs: %d; associated providers: %d; name: %s\n", info->ncrtcs, info->noutputs, info->nassociatedproviders, info->name); + + for (i = 0; i < info->noutputs; i++) { + output_t *output = find_output_by_xid (info->outputs[i]); + if (output) + printf (" output %s\n", output->output.string); + else + printf (" output 0x%x\n", (int)info->outputs[i]); + } + } + } +} int main (int argc, char **argv) @@ -3718,35 +3764,8 @@ main (int argc, char **argv) } exit (0); } - if (list_providers) { - int k; - - if (!has_1_4) { - printf ("RandR 1.4 not supported\n"); - exit (0); - } - - get_screen (current); - get_providers (); - - if (providers) { - int j; - - printf("Providers: number : %d\n", num_providers); - - for (j = 0; j < num_providers; j++) { - provider_t *provider = &providers[j]; - XRRProviderInfo *info = provider->info; - - printf("Provider %d: id: 0x%x cap: 0x%x", j, (int)provider->provider.xid, info->capabilities); - for (k = 0; k < 4; k++) - if (info->capabilities & (1 << k)) - printf(", %s", capability_name(1<<k)); - - printf(" crtcs: %d outputs: %d associated providers: %d name:%s\n", info->ncrtcs, info->noutputs, info->nassociatedproviders, info->name); - } - } - } + if (list_providers) + print_providers (current); sc = XRRGetScreenInfo (dpy, root);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor