[mutter] monitor-config-manager: Fix layout size with scaled mirroring
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] monitor-config-manager: Fix layout size with scaled mirroring
- Date: Mon, 15 Aug 2022 10:43:35 +0000 (UTC)
commit 5fb4a2c286af90788ff10457a395f606387b914e
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Thu Jun 23 12:42:55 2022 +0200
monitor-config-manager: Fix layout size with scaled mirroring
The dimension of the logical monitor layout was not scaled according to
the scale, meaning generated mirror monitor configurations were broken.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2479>
src/backends/meta-monitor-config-manager.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/backends/meta-monitor-config-manager.c b/src/backends/meta-monitor-config-manager.c
index eafc6c6b69..84ea04faa8 100644
--- a/src/backends/meta-monitor-config-manager.c
+++ b/src/backends/meta-monitor-config-manager.c
@@ -1180,6 +1180,7 @@ create_for_switch_config_all_mirror (MetaMonitorConfigManager *config_manager)
GList *monitors;
GList *l;
MetaMonitorsConfig *monitors_config;
+ int width, height;
layout_mode = meta_monitor_manager_get_default_layout_mode (monitor_manager);
monitors = meta_monitor_manager_get_monitors (monitor_manager);
@@ -1261,13 +1262,17 @@ create_for_switch_config_all_mirror (MetaMonitorConfigManager *config_manager)
monitor_configs = g_list_prepend (monitor_configs, create_monitor_config (monitor, mode));
}
+ scale_logical_monitor_width (layout_mode, best_scale,
+ common_mode_w, common_mode_h,
+ &width, &height);
+
logical_monitor_config = g_new0 (MetaLogicalMonitorConfig, 1);
*logical_monitor_config = (MetaLogicalMonitorConfig) {
.layout = (MetaRectangle) {
.x = 0,
.y = 0,
- .width = common_mode_w,
- .height = common_mode_h
+ .width = width,
+ .height = height
},
.scale = best_scale,
.monitor_configs = monitor_configs
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]