MonitorManager: Use composition instead of inheriting from dbus skeleton

MonitorManager was inheriting from MetaDBusDisplayConfigSkeleton, this was
causing introspection to see this like a GDBus skeleton object exposing to
clients methods that were not required.

Also, this required us to export meta_dbus_* symbols to the library, while
these should be actually private.

So, make MetaMonitorManager to be just a simple GObject holding a skeleton
instance, and connect to its signals reusing most of the code with just few
minor changes.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/395
This commit is contained in:
Marco Trevisan (Treviño)
2019-01-23 02:49:26 +01:00
parent 7f551ba776
commit e352011830
4 changed files with 72 additions and 38 deletions

View File

@ -1759,7 +1759,6 @@ check_mappable_devices (MetaInputSettings *input_settings)
static void
power_save_mode_changed_cb (MetaMonitorManager *manager,
GParamSpec *pspec,
gpointer user_data)
{
MetaInputSettingsPrivate *priv;
@ -1869,7 +1868,7 @@ meta_input_settings_init (MetaInputSettings *settings)
priv->monitor_manager = g_object_ref (meta_monitor_manager_get ());
g_signal_connect (priv->monitor_manager, "monitors-changed-internal",
G_CALLBACK (monitors_changed_cb), settings);
g_signal_connect (priv->monitor_manager, "notify::power-save-mode",
g_signal_connect (priv->monitor_manager, "power-save-mode-changed",
G_CALLBACK (power_save_mode_changed_cb), settings);
#ifdef HAVE_LIBWACOM