Commit 768d1411 authored by Alberts Muktupāvels's avatar Alberts Muktupāvels

backends: split monitor manager creation into create and setup

Based on mutter commit:
mutter@518fb9fb
parent 7e1bae01
......@@ -77,6 +77,8 @@ gf_backend_initable_init (GInitable *initable,
priv->settings = gf_settings_new (backend);
priv->orientation_manager = gf_orientation_manager_new ();
priv->monitor_manager = create_monitor_manager (backend);
return TRUE;
}
......@@ -109,7 +111,7 @@ gf_backend_real_post_init (GfBackend *backend)
priv = gf_backend_get_instance_private (backend);
priv->monitor_manager = create_monitor_manager (backend);
gf_monitor_manager_setup (priv->monitor_manager);
}
static void
......
......@@ -156,6 +156,8 @@ GType gf_monitor_manager_get_type (voi
GfBackend *gf_monitor_manager_get_backend (GfMonitorManager *manager);
void gf_monitor_manager_setup (GfMonitorManager *manager);
void gf_monitor_manager_rebuild_derived (GfMonitorManager *manager,
GfMonitorsConfig *config);
......
......@@ -1971,11 +1971,6 @@ gf_monitor_manager_constructed (GObject *object)
manager->current_switch_config = GF_MONITOR_SWITCH_CONFIG_UNKNOWN;
manager->config_manager = gf_monitor_config_manager_new (manager);
gf_monitor_manager_read_current_state (manager);
manager_class->ensure_initial_config (manager);
priv->bus_name_id = g_bus_own_name (G_BUS_TYPE_SESSION,
"org.gnome.Mutter.DisplayConfig",
G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT |
......@@ -1985,8 +1980,6 @@ gf_monitor_manager_constructed (GObject *object)
name_lost_cb,
g_object_ref (manager),
g_object_unref);
priv->in_init = FALSE;
}
static void
......@@ -2124,22 +2117,36 @@ gf_monitor_manager_class_init (GfMonitorManagerClass *manager_class)
static void
gf_monitor_manager_init (GfMonitorManager *manager)
{
}
GfBackend *
gf_monitor_manager_get_backend (GfMonitorManager *manager)
{
GfMonitorManagerPrivate *priv;
priv = gf_monitor_manager_get_instance_private (manager);
priv->in_init = TRUE;
return priv->backend;
}
GfBackend *
gf_monitor_manager_get_backend (GfMonitorManager *manager)
void
gf_monitor_manager_setup (GfMonitorManager *manager)
{
GfMonitorManagerPrivate *priv;
GfMonitorManagerClass *manager_class;
priv = gf_monitor_manager_get_instance_private (manager);
manager_class = GF_MONITOR_MANAGER_GET_CLASS (manager);
return priv->backend;
priv->in_init = TRUE;
manager->config_manager = gf_monitor_config_manager_new (manager);
gf_monitor_manager_read_current_state (manager);
manager_class->ensure_initial_config (manager);
priv->in_init = FALSE;
}
void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment