| 1 | From: Danny Milosavljevic <[email protected]>
|
| 2 | Date: Thu, 2 Apr 2022 12:10:00 +0200
|
| 3 | Subject: Make xterm use libxcursor directly
|
| 4 |
|
| 5 | Fixes <https://issues.guix.gnu.org/54654>.
|
| 6 |
|
| 7 | This patch makes xterm use libxcursor directly.
|
| 8 | Without it, libx11 would try to dlopen("libXcursor.so.1") and fail.
|
| 9 |
|
| 10 | |
| 11 | |
| 12 | @@ -79,6 +79,9 @@
|
| 13 | #ifdef HAVE_LIBXPM
|
| 14 | #include <X11/xpm.h>
|
| 15 | #endif
|
| 16 | +#ifdef HAVE_LIB_XCURSOR
|
| 17 | +#include <X11/Xcursor/Xcursor.h>
|
| 18 | +#endif
|
| 19 |
|
| 20 | #ifdef HAVE_LANGINFO_CODESET
|
| 21 | #include <langinfo.h>
|
| 22 | @@ -866,7 +869,14 @@
|
| 23 | * 0, 2 a shape, 3 a mask for 2, etc. <X11/cursorfont.h>
|
| 24 | * contains defined names for each shape.
|
| 25 | */
|
| 26 | - c = XCreateGlyphCursor(dpy,
|
| 27 | + c = XcursorTryShapeCursor(dpy,
|
| 28 | + myFont.fs->fid, /* source_font */
|
| 29 | + myFont.fs->fid, /* mask_font */
|
| 30 | + c_index + 0, /* source_char */
|
| 31 | + c_index + 1, /* mask_char */
|
| 32 | + &foreground,
|
| 33 | + &background);
|
| 34 | + if (c == None) c = XCreateGlyphCursor(dpy,
|
| 35 | myFont.fs->fid, /* source_font */
|
| 36 | myFont.fs->fid, /* mask_font */
|
| 37 | c_index + 0, /* source_char */
|