From 9f6f778589ffcfd6322d07c37775b64794909b06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Wed, 3 Aug 2016 15:16:16 +0800 Subject: [PATCH] MetaMonitorManagerKms: Set output scale when assigning crtc The scale will have been set to 1 no matter what when initializing the MetaOutput since it at the time didn't have an CRTC assigned to it. Now, when we assign the CRTC to the output, we need to update the scale. https://bugzilla.gnome.org/show_bug.cgi?id=769505 --- src/backends/native/meta-monitor-manager-kms.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/backends/native/meta-monitor-manager-kms.c b/src/backends/native/meta-monitor-manager-kms.c index 0cf6eece7..1de6484ed 100644 --- a/src/backends/native/meta-monitor-manager-kms.c +++ b/src/backends/native/meta-monitor-manager-kms.c @@ -1203,14 +1203,6 @@ meta_monitor_manager_kms_apply_configuration (MetaMonitorManager *manager, mode = crtc_info->mode; - for (j = 0; j < crtc_info->outputs->len; j++) - { - MetaOutput *output = g_ptr_array_index (crtc_info->outputs, j); - - output->is_dirty = TRUE; - output->crtc = crtc; - } - if (meta_monitor_transform_is_rotated (crtc_info->transform)) { width = mode->height; @@ -1231,6 +1223,15 @@ meta_monitor_manager_kms_apply_configuration (MetaMonitorManager *manager, crtc->rect.height = height; crtc->current_mode = mode; crtc->transform = crtc_info->transform; + + for (j = 0; j < crtc_info->outputs->len; j++) + { + MetaOutput *output = g_ptr_array_index (crtc_info->outputs, j); + + output->is_dirty = TRUE; + output->crtc = crtc; + output->scale = get_output_scale (manager, output); + } } if (crtc->all_transforms & (1 << crtc->transform))