DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit c122af48955dace9d01ada91b05d8d7359a9f08d
parent 2e224d4a7fda99a705879648a3b335f6c12b131f
Author: falkTX <falktx@falktx.com>
Date:   Mon, 28 Mar 2022 14:36:06 +0100

Do not check for dbus portal if already available

Signed-off-by: falkTX <falktx@falktx.com>

Diffstat:
Mdistrho/extra/FileBrowserDialog.cpp | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/distrho/extra/FileBrowserDialog.cpp b/distrho/extra/FileBrowserDialog.cpp @@ -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",