mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 04:42:14 +00:00
Revert "monitor-manager: Remove needless code"
It turns out that this was wrong because MetaWindow->monitor points to
the old monitor infos and they are needed to position windows in the
new configuration which happens in a monitors-changed handler.
This reverts commit e1704acda4
.
This commit is contained in:
parent
cd1e1d4bf1
commit
b63413e5b0
@ -149,8 +149,6 @@ make_logical_config (MetaMonitorManager *manager)
|
||||
manager->primary_monitor_index = info->number;
|
||||
}
|
||||
|
||||
g_free (manager->monitor_infos);
|
||||
|
||||
manager->n_monitor_infos = monitor_infos->len;
|
||||
manager->monitor_infos = (void*)g_array_free (monitor_infos, FALSE);
|
||||
}
|
||||
@ -1167,12 +1165,18 @@ meta_monitor_manager_read_current_config (MetaMonitorManager *manager)
|
||||
void
|
||||
meta_monitor_manager_rebuild_derived (MetaMonitorManager *manager)
|
||||
{
|
||||
MetaMonitorInfo *old_monitor_infos;
|
||||
|
||||
old_monitor_infos = manager->monitor_infos;
|
||||
|
||||
if (manager->in_init)
|
||||
return;
|
||||
|
||||
make_logical_config (manager);
|
||||
|
||||
g_signal_emit_by_name (manager, "monitors-changed");
|
||||
|
||||
g_free (old_monitor_infos);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user