Commit 84a223a5 authored by Guido Gunther's avatar Guido Gunther Committed by Guido Gunther
Browse files

screenshot-manager: Don't hold ref when acquiring the bus



Otherwise we never dispose since the ref would only be dropped
on g_bus_unown_name which is called in dispose.

Since the manager stays around until shell shutdown this isn't a
problem.
Signed-off-by: Guido Gunther's avatarGuido Günther <guido.gunther@puri.sm>
parent 7d4b7757
......@@ -457,11 +457,15 @@ on_bus_acquired (GDBusConnection *connection,
gpointer user_data)
{
PhoshScreenshotManager *self = PHOSH_SCREENSHOT_MANAGER (user_data);
g_autoptr (GError) err = NULL;
if (!g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (self),
connection,
OBJECT_PATH,
&err)) {
g_warning ("Failed to export screensaver interface skeleton: %s", err->message);
}
g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (self),
connection,
OBJECT_PATH,
NULL);
}
......@@ -480,8 +484,8 @@ phosh_screenshot_manager_constructed (GObject *object)
on_bus_acquired,
on_name_acquired,
on_name_lost,
g_object_ref (self),
g_object_unref);
self,
NULL);
g_return_if_fail (PHOSH_IS_WAYLAND (wl));
self->wl_scm = phosh_wayland_get_zwlr_screencopy_manager_v1 (wl);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment