[gnome-flashback] monitor-config-manager: fix layout size with scaled mirroring
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] monitor-config-manager: fix layout size with scaled mirroring
- Date: Sun, 4 Sep 2022 09:16:09 +0000 (UTC)
commit 96c8a465dbc98ac99a4a3e5eb43f3680b40bfaa3
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Fri Aug 19 20:28:35 2022 +0300
monitor-config-manager: fix layout size with scaled mirroring
Based on mutter commit:
https://gitlab.gnome.org/GNOME/mutter/-/commit/5fb4a2c286af90788ff10457a395f606387b914e
backends/gf-monitor-config-manager.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/backends/gf-monitor-config-manager.c b/backends/gf-monitor-config-manager.c
index 814b37c..54dfadc 100644
--- a/backends/gf-monitor-config-manager.c
+++ b/backends/gf-monitor-config-manager.c
@@ -355,6 +355,8 @@ create_for_switch_config_all_mirror (GfMonitorConfigManager *config_manager)
GList *monitors;
GList *l;
GfMonitorsConfig *monitors_config;
+ int width;
+ int height;
layout_mode = gf_monitor_manager_get_default_layout_mode (monitor_manager);
monitors = gf_monitor_manager_get_monitors (monitor_manager);
@@ -437,13 +439,20 @@ create_for_switch_config_all_mirror (GfMonitorConfigManager *config_manager)
monitor_configs = g_list_prepend (monitor_configs, gf_monitor_config_new (l_monitor, mode));
}
+ scale_logical_monitor_width (layout_mode,
+ best_scale,
+ common_mode_w,
+ common_mode_h,
+ &width,
+ &height);
+
logical_monitor_config = g_new0 (GfLogicalMonitorConfig, 1);
*logical_monitor_config = (GfLogicalMonitorConfig) {
.layout = (GfRectangle) {
.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]