monitor-manager: Take panel-orientation into account for physical size
Just like we swap the x and y resolution of the monitor modes when the panel-orientation requires 90 or 270 degree rotation to compensate, we should do the same for the width and height in mm of the monitor. https://bugzilla.gnome.org/show_bug.cgi?id=782294
This commit is contained in:

committed by
Jonas Ådahl

parent
dd43d04d42
commit
0bbda3ad87
@@ -489,8 +489,6 @@ meta_create_kms_output (MetaGpuKms *gpu_kms,
|
||||
output->gpu = gpu;
|
||||
output->winsys_id = connector->connector_id;
|
||||
output->name = make_output_name (connector);
|
||||
output->width_mm = connector->mmWidth;
|
||||
output->height_mm = connector->mmHeight;
|
||||
|
||||
switch (connector->subpixel)
|
||||
{
|
||||
@@ -518,6 +516,17 @@ meta_create_kms_output (MetaGpuKms *gpu_kms,
|
||||
output_kms->connector = connector;
|
||||
find_connector_properties (gpu_kms, output);
|
||||
|
||||
if (meta_monitor_transform_is_rotated (output->panel_orientation_transform))
|
||||
{
|
||||
output->width_mm = connector->mmHeight;
|
||||
output->height_mm = connector->mmWidth;
|
||||
}
|
||||
else
|
||||
{
|
||||
output->width_mm = connector->mmWidth;
|
||||
output->height_mm = connector->mmHeight;
|
||||
}
|
||||
|
||||
init_output_modes (output, gpu_kms);
|
||||
|
||||
/* FIXME: MSC feature bit? */
|
||||
|
Reference in New Issue
Block a user