[gnome-flashback] monitor-manager: move in_init to GfMonitorManager



commit 8a9ce9df5de698ebb09713de9400051c5960a121
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Fri Aug 12 17:14:06 2022 +0300

    monitor-manager: move in_init to GfMonitorManager

 backends/gf-monitor-manager-private.h |  2 ++
 backends/gf-monitor-manager.c         | 19 ++++---------------
 2 files changed, 6 insertions(+), 15 deletions(-)
---
diff --git a/backends/gf-monitor-manager-private.h b/backends/gf-monitor-manager-private.h
index 0fc1a3a..fdcdde8 100644
--- a/backends/gf-monitor-manager-private.h
+++ b/backends/gf-monitor-manager-private.h
@@ -52,6 +52,8 @@ struct _GfMonitorManager
 
   GfDBusDisplayConfig         *display_config;
 
+  gboolean                     in_init;
+
   guint                        serial;
 
   GfLogicalMonitorLayoutMode   layout_mode;
diff --git a/backends/gf-monitor-manager.c b/backends/gf-monitor-manager.c
index eb41ce3..1e3289e 100644
--- a/backends/gf-monitor-manager.c
+++ b/backends/gf-monitor-manager.c
@@ -48,8 +48,6 @@ typedef struct
 {
   GfBackend   *backend;
 
-  gboolean     in_init;
-
   guint        bus_name_id;
 
   guint        persistent_timeout_id;
@@ -343,11 +341,7 @@ gf_monitor_manager_is_config_complete (GfMonitorManager *manager,
 static gboolean
 should_use_stored_config (GfMonitorManager *manager)
 {
-  GfMonitorManagerPrivate *priv;
-
-  priv = gf_monitor_manager_get_instance_private (manager);
-
-  return (priv->in_init || !gf_monitor_manager_has_hotplug_mode_update (manager));
+  return (manager->in_init || !gf_monitor_manager_has_hotplug_mode_update (manager));
 }
 
 static gfloat
@@ -2477,15 +2471,13 @@ gf_monitor_manager_get_backend (GfMonitorManager *manager)
 void
 gf_monitor_manager_setup (GfMonitorManager *manager)
 {
-  GfMonitorManagerPrivate *priv;
   GfMonitorManagerClass *manager_class;
   GfMonitorConfigStore *config_store;
   const GfMonitorConfigPolicy *policy;
 
-  priv = gf_monitor_manager_get_instance_private (manager);
   manager_class = GF_MONITOR_MANAGER_GET_CLASS (manager);
 
-  priv->in_init = TRUE;
+  manager->in_init = TRUE;
 
   manager->config_manager = gf_monitor_config_manager_new (manager);
 
@@ -2498,21 +2490,18 @@ gf_monitor_manager_setup (GfMonitorManager *manager)
   gf_dbus_display_config_set_apply_monitors_config_allowed (manager->display_config,
                                                             policy->enable_dbus);
 
-  priv->in_init = FALSE;
+  manager->in_init = FALSE;
 }
 
 void
 gf_monitor_manager_rebuild_derived (GfMonitorManager *manager,
                                     GfMonitorsConfig *config)
 {
-  GfMonitorManagerPrivate *priv;
   GList *old_logical_monitors;
 
-  priv = gf_monitor_manager_get_instance_private (manager);
-
   gf_monitor_manager_update_monitor_modes_derived (manager);
 
-  if (priv->in_init)
+  if (manager->in_init)
     return;
 
   old_logical_monitors = manager->logical_monitors;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]