monitor-manager: Add support for suggested position for outputs

In recent versions of the QXL driver, it may set "suggested X|Y" connector
properties. These properties are used to indicate the position at which
multiple displays should be aligned.  If all outputs have a suggested position,
the displays are arranged according to these positions, otherwise we fall back
to the default configuration.

At the moment, we trust that the driver has chosen sane values for the
suggested position.
This commit is contained in:
Jonathon Jongsma
2014-11-10 15:36:47 -06:00
parent 7012c82fc7
commit f6f5f624d4
4 changed files with 109 additions and 0 deletions

View File

@ -415,6 +415,8 @@ meta_monitor_manager_kms_read_current (MetaMonitorManager *manager)
meta_output->name = make_output_name (connector);
meta_output->width_mm = connector->mmWidth;
meta_output->height_mm = connector->mmHeight;
meta_output->suggested_x = -1;
meta_output->suggested_y = -1;
switch (connector->subpixel)
{