aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-05-27 12:54:38 -0400
committerDavid Robillard <d@drobilla.net>2023-05-27 12:55:13 -0400
commitef3894166bda794a7ed3baad745432b5ee5d6789 (patch)
tree3bee14c795eec524e8ec3915b3886a1bc0a8697a
parent580584e896abfa9324e58c0fad39476cb4cc077c (diff)
downloadpugl-ef3894166bda794a7ed3baad745432b5ee5d6789.tar.gz
pugl-ef3894166bda794a7ed3baad745432b5ee5d6789.tar.bz2
pugl-ef3894166bda794a7ed3baad745432b5ee5d6789.zip
X11: Fix cursors on systems where XcursorGetTheme() doesn't work
-rw-r--r--src/x11.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/x11.c b/src/x11.c
index 4377f77..b389932 100644
--- a/src/x11.c
+++ b/src/x11.c
@@ -470,9 +470,10 @@ defineCursorName(PuglView* const view, const char* const name)
Display* const display = world->impl->display;
// Load cursor theme
- char* const theme = XcursorGetTheme(display);
+ const char* theme = XcursorGetTheme(display);
if (!theme) {
- return PUGL_FAILURE;
+ // If that fails (like on Linux Mint 21.1), "default" usually works
+ theme = "default";
}
// Get the default size and cursor image from it