From 2d5d8ea5e2643f6ed42138bfe8cf9564130d18c9 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 12 Nov 2021 13:49:27 +0000 Subject: [PATCH] More build fixes Signed-off-by: falkTX --- distrho/DistrhoUI_macOS.mm | 2 +- distrho/extra/FileBrowserDialog.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/distrho/DistrhoUI_macOS.mm b/distrho/DistrhoUI_macOS.mm index 3924a2c6..24f24f37 100644 --- a/distrho/DistrhoUI_macOS.mm +++ b/distrho/DistrhoUI_macOS.mm @@ -27,7 +27,7 @@ # include # include # ifndef DGL_FILE_BROWSER_DISABLED -# include "extra/FileBrowserDialog.cpp" +# import "extra/FileBrowserDialog.cpp" # endif // Declared in DistrhoUI.cpp but defined here because it uses Obj-C diff --git a/distrho/extra/FileBrowserDialog.cpp b/distrho/extra/FileBrowserDialog.cpp index a2590a4e..af552b80 100644 --- a/distrho/extra/FileBrowserDialog.cpp +++ b/distrho/extra/FileBrowserDialog.cpp @@ -231,9 +231,11 @@ struct FileBrowserData { #ifdef DISTRHO_OS_MAC [nsBasePanel release]; #endif -#ifdef HAVE_X11 +#ifdef HAVE_DBUS if (dbuscon != nullptr) dbus_connection_unref(dbuscon); +#endif +#ifdef HAVE_X11 if (x11display != nullptr) XCloseDisplay(x11display); #endif @@ -345,6 +347,7 @@ FileBrowserHandle fileBrowserCreate(const bool isEmbed, // optional, can be null if (DBusConnection* dbuscon = handle->dbuscon) { + // https://flatpak.github.io/xdg-desktop-portal/portal-docs.html#gdbus-org.freedesktop.portal.FileChooser if (DBusMessage* const message = dbus_message_new_method_call("org.freedesktop.portal.Desktop", "/org/freedesktop/portal/desktop", "org.freedesktop.portal.FileChooser",