Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Basnett <cmbasnett@gmail.com>2022-09-17 03:50:37 +0300
committerColin Basnett <cmbasnett@gmail.com>2022-09-17 03:50:37 +0300
commit564bda241a973396da51d7c3ccd9efd97d51728a (patch)
tree4d9aa4cccd82e2e606b47774afa5e1015bf14768 /intern/ghost/intern/GHOST_WaylandCursorSettings.h
parent0fff238150d076576053c25b646f653d6e3b0edb (diff)
parent48d7ff68f0df209c77bbb081ab46fbc109fd825a (diff)
Merge branch 'master' into feature-imformatfeature-imformat
Diffstat (limited to 'intern/ghost/intern/GHOST_WaylandCursorSettings.h')
-rw-r--r--intern/ghost/intern/GHOST_WaylandCursorSettings.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/intern/ghost/intern/GHOST_WaylandCursorSettings.h b/intern/ghost/intern/GHOST_WaylandCursorSettings.h
index 2491f6ca31f..f5649d20850 100644
--- a/intern/ghost/intern/GHOST_WaylandCursorSettings.h
+++ b/intern/ghost/intern/GHOST_WaylandCursorSettings.h
@@ -5,9 +5,13 @@
*/
#pragma once
-#include <dbus/dbus.h>
#include <string>
+#ifdef WITH_GHOST_WAYLAND_DBUS
+# include <dbus/dbus.h>
+#endif
+
+#ifdef WITH_GHOST_WAYLAND_DBUS
static DBusMessage *get_setting_sync(DBusConnection *const connection,
const char *key,
const char *value)
@@ -66,9 +70,11 @@ static bool parse_type(DBusMessage *const reply, const int type, void *value)
return true;
}
+#endif /* WITH_GHOST_WAYLAND_DBUS */
static bool get_cursor_settings(std::string &theme, int &size)
{
+#ifdef WITH_GHOST_WAYLAND_DBUS
static const char name[] = "org.gnome.desktop.interface";
static const char key_theme[] = "cursor-theme";
static const char key_size[] = "cursor-size";
@@ -113,4 +119,11 @@ static bool get_cursor_settings(std::string &theme, int &size)
dbus_message_unref(reply);
return true;
+#else
+ /* NOTE: eventually we could have alternative ways to access the theme,
+ * this uses the "default" theme which is functional (instead of a user-defined theme). */
+ (void)theme;
+ (void)size;
+ return false;
+#endif /* !WITH_GHOST_WAYLAND_DBUS */
}