mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 17:40:40 -05:00
monitor-manager: Update the monitor mode state before the logical state
This means we can use up to date monitor mode data when generating the logical state. https://bugzilla.gnome.org/show_bug.cgi?id=777732
This commit is contained in:
parent
53a93deafc
commit
409c92a68f
@ -1776,6 +1776,10 @@ meta_monitor_manager_update_monitor_modes (MetaMonitorManager *manager,
|
||||
GList *logical_monitor_configs;
|
||||
GList *l;
|
||||
|
||||
g_list_foreach (manager->monitors,
|
||||
(GFunc) meta_monitor_set_current_mode,
|
||||
NULL);
|
||||
|
||||
logical_monitor_configs = config ? config->logical_monitor_configs : NULL;
|
||||
for (l = logical_monitor_configs; l; l = l->next)
|
||||
{
|
||||
@ -1783,14 +1787,6 @@ meta_monitor_manager_update_monitor_modes (MetaMonitorManager *manager,
|
||||
|
||||
set_logical_monitor_modes (manager, logical_monitor_config);
|
||||
}
|
||||
|
||||
for (l = manager->monitors; l; l = l->next)
|
||||
{
|
||||
MetaMonitor *monitor = l->data;
|
||||
|
||||
if (!meta_monitor_get_logical_monitor (monitor))
|
||||
meta_monitor_set_current_mode (monitor, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@ -1798,7 +1794,6 @@ meta_monitor_manager_update_logical_state (MetaMonitorManager *manager,
|
||||
MetaMonitorsConfig *config)
|
||||
{
|
||||
meta_monitor_manager_rebuild_logical_monitors (manager, config);
|
||||
meta_monitor_manager_update_monitor_modes (manager, config);
|
||||
}
|
||||
|
||||
void
|
||||
@ -1807,6 +1802,8 @@ meta_monitor_manager_rebuild (MetaMonitorManager *manager,
|
||||
{
|
||||
GList *old_logical_monitors;
|
||||
|
||||
meta_monitor_manager_update_monitor_modes (manager, config);
|
||||
|
||||
if (manager->in_init)
|
||||
return;
|
||||
|
||||
@ -1836,7 +1833,6 @@ void
|
||||
meta_monitor_manager_update_logical_state_derived (MetaMonitorManager *manager)
|
||||
{
|
||||
meta_monitor_manager_rebuild_logical_monitors_derived (manager);
|
||||
meta_monitor_manager_update_monitor_modes_derived (manager);
|
||||
}
|
||||
|
||||
void
|
||||
@ -1844,6 +1840,8 @@ meta_monitor_manager_rebuild_derived (MetaMonitorManager *manager)
|
||||
{
|
||||
GList *old_logical_monitors;
|
||||
|
||||
meta_monitor_manager_update_monitor_modes_derived (manager);
|
||||
|
||||
if (manager->in_init)
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user