Commit bfb01552 authored by Benjamin Berg's avatar Benjamin Berg

lib: Automatically delete client on server when using GClueSimple

When using GClueSimple, the user will not be managing the
GClueClientProxy directly. In this case, it makes sense to set things up
so that the client is deleted from the server again on object
destruction.

Fixes: #102
parent 044418f5
......@@ -308,7 +308,7 @@ on_client_created (GObject *source_object,
GClueSimplePrivate *priv = simple->priv;
GError *error = NULL;
priv->client = gclue_client_proxy_create_finish (res, &error);
priv->client = gclue_client_proxy_create_full_finish (res, &error);
if (error != NULL) {
g_task_return_error (task, error);
g_clear_object (&priv->task);
......@@ -341,11 +341,12 @@ gclue_simple_init_async (GAsyncInitable *initable,
task = g_task_new (initable, cancellable, callback, user_data);
gclue_client_proxy_create (simple->priv->desktop_id,
simple->priv->accuracy_level,
cancellable,
on_client_created,
task);
gclue_client_proxy_create_full (simple->priv->desktop_id,
simple->priv->accuracy_level,
GCLUE_CLIENT_PROXY_CREATE_AUTO_DELETE,
cancellable,
on_client_created,
task);
}
static gboolean
......
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