]> rtime.felk.cvut.cz Git - sojka/lightdm.git/commitdiff
Activate after unlocking a logind session
authorMichael Terry <michael.terry@canonical.com>
Mon, 17 Mar 2014 02:30:41 +0000 (22:30 -0400)
committerMichael Terry <michael.terry@canonical.com>
Mon, 17 Mar 2014 02:30:41 +0000 (22:30 -0400)
src/login1.c

index 24b4d6daf39cd2034a84b1daf9fb0cd7537e1e75..3ddd2ade11d90478e888221e16614da64e670f2c 100644 (file)
@@ -136,8 +136,28 @@ login1_unlock_session (const gchar *session_path)
         if (error)
             g_warning ("Error unlocking login1 session: %s", error->message);
         g_clear_error (&error);
+
         if (result)
+        {
             g_variant_unref (result);
+
+            result = g_dbus_connection_call_sync (bus,
+                                                  "org.freedesktop.login1",
+                                                  session_path,
+                                                  "org.freedesktop.login1.Session",
+                                                  "Activate",
+                                                  g_variant_new ("()"),
+                                                  G_VARIANT_TYPE ("()"),
+                                                  G_DBUS_CALL_FLAGS_NONE,
+                                                  -1,
+                                                  NULL,
+                                                  &error);
+            if (error)
+                g_warning ("Error activating login1 session: %s", error->message);
+            g_clear_error (&error);
+            if (result)
+                g_variant_unref (result);
+        }
     }
     g_object_unref (bus);
 }