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:
parent
6ac106d3d3
commit
1a0bd44694
1 changed files with 11 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue