Browse Source

Do not check for dbus portal if already available

Signed-off-by: falkTX <falktx@falktx.com>
pull/375/head
falkTX 3 years ago
parent
commit
c122af4895
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      distrho/extra/FileBrowserDialog.cpp

+ 3
- 3
distrho/extra/FileBrowserDialog.cpp View File

@@ -363,11 +363,11 @@ FileBrowserHandle fileBrowserCreate(const bool isEmbed,
if (dbuscon != nullptr)
{
// if this is the first time we are calling into DBus, check if things are working
static bool firstTry = true;
static bool checkAvailable = !dbus_bus_name_has_owner(dbuscon, "org.freedesktop.portal.Desktop", nullptr);

if (firstTry)
if (checkAvailable)
{
firstTry = false;
checkAvailable = false;

if (DBusMessage* const msg = dbus_message_new_method_call("org.freedesktop.portal.Desktop",
"/org/freedesktop/portal/desktop",


Loading…
Cancel
Save