Skip to content
Commit d7622e15 authored by Simon McVittie's avatar Simon McVittie Committed by Alexander Larsson
Browse files

open-uri: Avoid calling into o.fd.FileManager1 during startup

Making a synchronous call into a GTK implementation of o.fd.FileManager1
can cause a deadlock, because GtkApplication makes a synchronous call
into the Inhibit portal when started in a non-GNOME, non-XFCE environment.
In this situation, each service does not take its bus name (and hence
complete service-activation) until it gets a reply from the other, which
obviously can't work.

We don't actually need a GDBusProxy here: we don't need to subscribe to
any signals, watch any properties or hold any state, so it's just as
straightforward to use g_dbus_connection_call_sync() on a just-in-time
basis.

The indentation is deliberately a bit odd here, to avoid a large
diffstat from re-indentation; it will be fixed in a subsequent commit.

Fixes: 69961f3f "openuri: Use FileManager1 in OpenDirectory"
Resolves: https://github.com/flatpak/xdg-desktop-portal/issues/636


Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 922c2b8d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment