RandR has two sets of screen geometry information:
1. CRTC. These are the physical scanout engines in the hardware
2. Monitors. These are the logical partitions of the screen.
By default, each CRTC gets mapped to a Monitor. However, some monitors
actually require two CRTCs to drive them due to limitations in the
scanout hardware. Users can also create 'virtual' monitors to support
VNC or other systems.
This patch makes the RandR code prefer the Monitor mechanism to the
older CRTC mechanism. If the server doesn't support a new enough RandR
version, the existing CRTC code is used instead.
The name of the monitor is also provided in place of the arbitrary
number to help users select the desired source.
Signed-off-by: Keith Packard <keithp@keithp.com>
Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed. Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.