mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 19:40:43 -05:00
monitor-manager: Make config timeout API non-static
While already cleaning up API, if this should ever be more non-static than a constant, it's better if its a function on the monitor manager instance than something static. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2718>
This commit is contained in:
parent
71371750d2
commit
872420f460
@ -1861,8 +1861,8 @@ restore_previous_config (MetaMonitorManager *manager)
|
||||
meta_monitor_manager_ensure_configured (manager);
|
||||
}
|
||||
|
||||
gint
|
||||
meta_monitor_manager_get_display_configuration_timeout (void)
|
||||
int
|
||||
meta_monitor_manager_get_display_configuration_timeout (MetaMonitorManager *manager)
|
||||
{
|
||||
return DEFAULT_DISPLAY_CONFIGURATION_TIMEOUT;
|
||||
}
|
||||
@ -1887,7 +1887,10 @@ cancel_persistent_confirmation (MetaMonitorManager *manager)
|
||||
static void
|
||||
request_persistent_confirmation (MetaMonitorManager *manager)
|
||||
{
|
||||
manager->persistent_timeout_id = g_timeout_add_seconds (meta_monitor_manager_get_display_configuration_timeout (),
|
||||
int timeout_s;
|
||||
|
||||
timeout_s = meta_monitor_manager_get_display_configuration_timeout (manager);
|
||||
manager->persistent_timeout_id = g_timeout_add_seconds (timeout_s,
|
||||
save_config_timeout,
|
||||
manager);
|
||||
g_source_set_name_by_id (manager->persistent_timeout_id,
|
||||
|
@ -60,7 +60,7 @@ META_EXPORT
|
||||
MetaMonitorSwitchConfigType meta_monitor_manager_get_switch_config (MetaMonitorManager *manager);
|
||||
|
||||
META_EXPORT
|
||||
gint meta_monitor_manager_get_display_configuration_timeout (void);
|
||||
int meta_monitor_manager_get_display_configuration_timeout (MetaMonitorManager *manager);
|
||||
|
||||
META_EXPORT
|
||||
gboolean meta_monitor_manager_get_panel_orientation_managed (MetaMonitorManager *manager);
|
||||
|
Loading…
Reference in New Issue
Block a user