[mutter] monitor-config-manager: Find builtin configuration even when inactive
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] monitor-config-manager: Find builtin configuration even when inactive
- Date: Sat, 4 Sep 2021 09:12:41 +0000 (UTC)
commit c3263133704174eb1166b5f3d27abd0c17bc3a37
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Fri Jul 30 14:12:40 2021 +0200
monitor-config-manager: Find builtin configuration even when inactive
When creating the configuration for the builtin monitor we try to get
the panel configuration for the builtin panel, but we don't proceed if
that monitor is currently inactive.
This is fine when adjusting an active configuration to the current
device rotation, but it isn't correct when we want to create a new
configuration based on another where the monitor is configured but not
yet enabled.
So, only find the panel configuration without looking the current state
but ensuring that the passed configuration will enable it.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1233>
src/backends/meta-monitor-config-manager.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/backends/meta-monitor-config-manager.c b/src/backends/meta-monitor-config-manager.c
index 0a895c0a5e..341ca155fe 100644
--- a/src/backends/meta-monitor-config-manager.c
+++ b/src/backends/meta-monitor-config-manager.c
@@ -1007,7 +1007,7 @@ find_logical_config_for_builtin_display_rotation (MetaMonitorConfigManager *conf
GList *l;
panel = meta_monitor_manager_get_laptop_panel (config_manager->monitor_manager);
- if (panel && meta_monitor_is_active (panel))
+ if (panel)
{
for (l = logical_monitor_configs; l; l = l->next)
{
@@ -1022,7 +1022,14 @@ find_logical_config_for_builtin_display_rotation (MetaMonitorConfigManager *conf
monitor_config = logical_monitor_config->monitor_configs->data;
if (meta_monitor_spec_equals (meta_monitor_get_spec (panel),
monitor_config->monitor_spec))
- return logical_monitor_config;
+ {
+ MetaMonitorMode *mode;
+
+ mode = meta_monitor_get_mode_from_spec (panel,
+ monitor_config->mode_spec);
+ if (mode)
+ return logical_monitor_config;
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]