diff options
author | Matthias Clasen <mclasen@redhat.com> | 2018-08-30 16:38:03 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2018-08-30 16:39:06 -0400 |
commit | cc141caaeb5289c911e9247641509e223d15a7be (patch) | |
tree | a8bc2c2b30c2a81eeecb64c3cfe412532590fa9b | |
parent | ccf2d65ff7ac7d11b183bbff052e1a047568dcba (diff) | |
download | gtk+-cc141caaeb5289c911e9247641509e223d15a7be.tar.gz |
GtkApplication: Respect GTK_USE_PORTAL
When the environment variable is set, don't connect
to the session manager, but instead rely on the
inhibit portal.
-rw-r--r-- | gtk/gtkapplication-dbus.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk/gtkapplication-dbus.c b/gtk/gtkapplication-dbus.c index 14f7bcc49c..d0110a73a9 100644 --- a/gtk/gtkapplication-dbus.c +++ b/gtk/gtkapplication-dbus.c @@ -199,6 +199,9 @@ gtk_application_impl_dbus_startup (GtkApplicationImpl *impl, dbus->object_path = g_application_get_dbus_object_path (G_APPLICATION (impl->application)); dbus->unique_name = g_dbus_connection_get_unique_name (dbus->session); + if (gtk_should_use_portal ()) + goto out; + g_debug ("Connecting to session manager"); /* Try the GNOME session manager first */ |