mirror of
https://github.com/brl/mutter.git
synced 2025-02-17 05:44:08 +00:00
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>
This commit is contained in:
parent
b2ba653dd9
commit
5fb4a2c286
@ -1180,6 +1180,7 @@ create_for_switch_config_all_mirror (MetaMonitorConfigManager *config_manager)
|
|||||||
GList *monitors;
|
GList *monitors;
|
||||||
GList *l;
|
GList *l;
|
||||||
MetaMonitorsConfig *monitors_config;
|
MetaMonitorsConfig *monitors_config;
|
||||||
|
int width, height;
|
||||||
|
|
||||||
layout_mode = meta_monitor_manager_get_default_layout_mode (monitor_manager);
|
layout_mode = meta_monitor_manager_get_default_layout_mode (monitor_manager);
|
||||||
monitors = meta_monitor_manager_get_monitors (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));
|
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 = g_new0 (MetaLogicalMonitorConfig, 1);
|
||||||
*logical_monitor_config = (MetaLogicalMonitorConfig) {
|
*logical_monitor_config = (MetaLogicalMonitorConfig) {
|
||||||
.layout = (MetaRectangle) {
|
.layout = (MetaRectangle) {
|
||||||
.x = 0,
|
.x = 0,
|
||||||
.y = 0,
|
.y = 0,
|
||||||
.width = common_mode_w,
|
.width = width,
|
||||||
.height = common_mode_h
|
.height = height
|
||||||
},
|
},
|
||||||
.scale = best_scale,
|
.scale = best_scale,
|
||||||
.monitor_configs = monitor_configs
|
.monitor_configs = monitor_configs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user