1
0
Fork 0

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>
This commit is contained in:
Jonas Ådahl 2022-08-18 18:31:49 +02:00 committed by Marge Bot
parent 6ac106d3d3
commit 1a0bd44694

View file

@ -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