[mutter] backend: Hook up to the parent constructed()
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] backend: Hook up to the parent constructed()
- Date: Fri, 2 Sep 2022 21:10:20 +0000 (UTC)
commit 1a0bd44694a17d8035a1eceb2a7bc2440c22d19f
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Thu Aug 18 18:31:49 2022 +0200
backend: Hook up to the parent constructed()
Doing an early out in a constructed() is a bit awkward, and unexpected,
and makes it tricky to call the parents constructed() method (which we
didn't), so clean that up.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2578>
src/backends/meta-backend.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/src/backends/meta-backend.c b/src/backends/meta-backend.c
index 32d8834207..509dd2aade 100644
--- a/src/backends/meta-backend.c
+++ b/src/backends/meta-backend.c
@@ -810,16 +810,18 @@ meta_backend_constructed (GObject *object)
}
#endif
- if (backend_class->is_lid_closed != meta_backend_real_is_lid_closed)
- return;
+ if (backend_class->is_lid_closed == meta_backend_real_is_lid_closed)
+ {
+ priv->upower_watch_id = g_bus_watch_name (G_BUS_TYPE_SYSTEM,
+ "org.freedesktop.UPower",
+ G_BUS_NAME_WATCHER_FLAGS_NONE,
+ upower_appeared,
+ upower_vanished,
+ backend,
+ NULL);
+ }
- priv->upower_watch_id = g_bus_watch_name (G_BUS_TYPE_SYSTEM,
- "org.freedesktop.UPower",
- G_BUS_NAME_WATCHER_FLAGS_NONE,
- upower_appeared,
- upower_vanished,
- backend,
- NULL);
+ G_OBJECT_CLASS (meta_backend_parent_class)->constructed (object);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]