From 8aa1c30bf1703b9d68be2721956befa4dcee4c79 Mon Sep 17 00:00:00 2001 From: Hideyuki Nagase Date: Thu, 10 Mar 2022 10:41:37 -0600 Subject: [PATCH] xwayland: Honour the XCURSOR_THEME environment variable Toy toolkit apps already do this since commit 807cd2e589 Co-authored-by: Steve Pronovost Co-authored-by: Brenton DeGeer Signed-off-by: Hideyuki Nagase Signed-off-by: Steve Pronovost Signed-off-by: Brenton DeGeer --- xwayland/window-manager.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c index ef8d92b0..f5b61c42 100644 --- a/xwayland/window-manager.c +++ b/xwayland/window-manager.c @@ -346,6 +346,7 @@ xcb_cursor_library_load_cursor(struct weston_wm *wm, const char *file) xcb_cursor_t cursor; XcursorImages *images; char *v = NULL; + char *theme; int size = 0; if (!file) @@ -358,7 +359,9 @@ xcb_cursor_library_load_cursor(struct weston_wm *wm, const char *file) if (!size) size = 32; - images = XcursorLibraryLoadImages (file, NULL, size); + theme = getenv("XCURSOR_THEME"); + + images = XcursorLibraryLoadImages(file, theme, size); if (!images) return -1;