Skip to content

Commit

Permalink
daemon-skeleton.h: Make sure the GMainLoop is accessible everywhere
Browse files Browse the repository at this point in the history
it's needed.
  • Loading branch information
mtwebster committed Nov 9, 2023
1 parent 349e27a commit ae96c48
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions plugins/common/daemon-skeleton.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ client_proxy_signal_cb (GDBusProxy *proxy,
static void
on_client_registered (GObject *source_object,
GAsyncResult *res,
gpointer user_data)
GMainLoop *loop)
{
GVariant *variant;
GDBusProxy *client_proxy;
Expand Down Expand Up @@ -109,14 +109,14 @@ on_client_registered (GObject *source_object,
}

g_signal_connect (client_proxy, "g-signal",
G_CALLBACK (client_proxy_signal_cb), NULL);
G_CALLBACK (client_proxy_signal_cb), loop);

g_free (object_path);
g_variant_unref (variant);
}

static void
register_with_cinnamon_session (void)
register_with_cinnamon_session (GMainLoop *loop)
{
const char *startup_id;
GError *error = NULL;
Expand Down Expand Up @@ -155,7 +155,7 @@ register_with_cinnamon_session (void)
-1,
NULL,
(GAsyncReadyCallback) on_client_registered,
NULL);
loop);
}

static gboolean
Expand Down Expand Up @@ -224,12 +224,12 @@ main (int argc, char **argv)
error = NULL;

if (REGISTER_BEFORE_STARTING) {
register_with_cinnamon_session ();
register_with_cinnamon_session (loop);
started = START (manager, &error);
}
else {
started = START (manager, &error);
register_with_cinnamon_session ();
register_with_cinnamon_session (loop);
}

if (!started) {
Expand Down

0 comments on commit ae96c48

Please sign in to comment.