xrandr: look for providers by name or xid
authorAaron Plattner <aplattner@nvidia.com>
Tue, 5 Feb 2013 00:17:24 +0000 (16:17 -0800)
committerAaron Plattner <aplattner@nvidia.com>
Wed, 6 Feb 2013 17:58:45 +0000 (09:58 -0800)
commit138b6252c0cae6599b6c8a25ffa22ffe70f227c2
treea3b9de55d75a3f756c932cd3b29ce2139ab4b6fa
parenta93b77b15fa2463c7fd06c6898b9c9f737c3ae8a
xrandr: look for providers by name or xid

Use the name_t infrastructure to allow specifying providers by name, index, or
XID.  This means that numbers without a "0x" prefix will now be interpreted as a
indices rather than XIDs.  To match that, print provider XIDs in hexadecimal.

Print an error if a provider-related option is specified and RandR 1.4 isn't
supported.

Make get_screen robust against being called multiple times.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
xrandr.c