mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05:00
monitor-manager: Clean up hot-plug paths slightly
Make the API used more shared and better named. meta_monitor_manager_on_hotplug() was renamed meta_monitor_manager_reconfigure(), and meta_monitor_manager_reload() was introduced to combine reading the current state and reconfiguring. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1689>
This commit is contained in:
parent
e48be709f8
commit
432682f305
@ -325,11 +325,12 @@ void meta_monitor_manager_confirm_configuration (MetaMonitorManag
|
||||
|
||||
gboolean meta_monitor_manager_has_hotplug_mode_update (MetaMonitorManager *manager);
|
||||
|
||||
META_EXPORT_TEST
|
||||
void meta_monitor_manager_read_current_state (MetaMonitorManager *manager);
|
||||
|
||||
void meta_monitor_manager_reconfigure (MetaMonitorManager *manager);
|
||||
|
||||
META_EXPORT_TEST
|
||||
void meta_monitor_manager_on_hotplug (MetaMonitorManager *manager);
|
||||
void meta_monitor_manager_reload (MetaMonitorManager *manager);
|
||||
|
||||
gboolean meta_monitor_manager_get_monitor_matrix (MetaMonitorManager *manager,
|
||||
MetaMonitor *monitor,
|
||||
|
@ -809,7 +809,7 @@ experimental_features_changed (MetaSettings *settings,
|
||||
should_reconfigure = TRUE;
|
||||
|
||||
if (should_reconfigure)
|
||||
meta_monitor_manager_on_hotplug (manager);
|
||||
meta_monitor_manager_reconfigure (manager);
|
||||
|
||||
meta_settings_update_ui_scaling_factor (settings);
|
||||
}
|
||||
@ -3098,11 +3098,18 @@ meta_monitor_manager_rebuild_derived (MetaMonitorManager *manager,
|
||||
}
|
||||
|
||||
void
|
||||
meta_monitor_manager_on_hotplug (MetaMonitorManager *manager)
|
||||
meta_monitor_manager_reconfigure (MetaMonitorManager *manager)
|
||||
{
|
||||
meta_monitor_manager_ensure_configured (manager);
|
||||
}
|
||||
|
||||
void
|
||||
meta_monitor_manager_reload (MetaMonitorManager *manager)
|
||||
{
|
||||
meta_monitor_manager_read_current_state (manager);
|
||||
meta_monitor_manager_reconfigure (manager);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
calculate_viewport_matrix (MetaMonitorManager *manager,
|
||||
MetaLogicalMonitor *logical_monitor,
|
||||
|
@ -463,8 +463,7 @@ meta_monitor_manager_kms_set_crtc_gamma (MetaMonitorManager *manager,
|
||||
static void
|
||||
handle_hotplug_event (MetaMonitorManager *manager)
|
||||
{
|
||||
meta_monitor_manager_read_current_state (manager);
|
||||
meta_monitor_manager_on_hotplug (manager);
|
||||
meta_monitor_manager_reload (manager);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1126,7 +1126,7 @@ meta_monitor_manager_xrandr_handle_xevent (MetaMonitorManagerXrandr *manager_xra
|
||||
manager_xrandr->last_xrandr_set_timestamp);
|
||||
if (is_hotplug)
|
||||
{
|
||||
meta_monitor_manager_on_hotplug (manager);
|
||||
meta_monitor_manager_reconfigure (manager);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -63,8 +63,7 @@ meta_monitor_manager_test_emulate_hotplug (MetaMonitorManagerTest *manager_test,
|
||||
old_test_setup = manager_test->test_setup;
|
||||
manager_test->test_setup = test_setup;
|
||||
|
||||
meta_monitor_manager_read_current_state (manager);
|
||||
meta_monitor_manager_on_hotplug (manager);
|
||||
meta_monitor_manager_reload (manager);
|
||||
|
||||
g_free (old_test_setup);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user