aboutsummaryrefslogtreecommitdiff
path: root/x.c
diff options
context:
space:
mode:
authorTim Keller <tjkeller.xyz>2025-01-11 15:07:46 -0600
committerTim Keller <tjkeller.xyz>2025-01-11 15:07:46 -0600
commit3f8366fe353fe7d161821c282a135fb9d6184c35 (patch)
tree9b7de16cb8bc454847be1eff220122a5f9ec2bc7 /x.c
parent296c863791a47eabd4ec64c35686d7eaf000709c (diff)
downloadst-3f8366fe353fe7d161821c282a135fb9d6184c35.tar.xz
st-3f8366fe353fe7d161821c282a135fb9d6184c35.zip
add themed cursor patch and button 3 paste
Diffstat (limited to 'x.c')
-rw-r--r--x.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/x.c b/x.c
index e2c7bdc..f6e066b 100644
--- a/x.c
+++ b/x.c
@@ -14,6 +14,7 @@
#include <X11/keysym.h>
#include <X11/Xft/Xft.h>
#include <X11/XKBlib.h>
+#include <X11/Xcursor/Xcursor.h>
char *argv0;
#include "arg.h"
@@ -1215,23 +1216,9 @@ xinit(int cols, int rows)
}
/* white cursor, black outline */
- cursor = XCreateFontCursor(xw.dpy, mouseshape);
+ cursor = XcursorLibraryLoadCursor(xw.dpy, mouseshape);
XDefineCursor(xw.dpy, xw.win, cursor);
- if (XParseColor(xw.dpy, xw.cmap, colorname[mousefg], &xmousefg) == 0) {
- xmousefg.red = 0xffff;
- xmousefg.green = 0xffff;
- xmousefg.blue = 0xffff;
- }
-
- if (XParseColor(xw.dpy, xw.cmap, colorname[mousebg], &xmousebg) == 0) {
- xmousebg.red = 0x0000;
- xmousebg.green = 0x0000;
- xmousebg.blue = 0x0000;
- }
-
- XRecolorCursor(xw.dpy, cursor, &xmousefg, &xmousebg);
-
xw.xembed = XInternAtom(xw.dpy, "_XEMBED", False);
xw.wmdeletewin = XInternAtom(xw.dpy, "WM_DELETE_WINDOW", False);
xw.netwmname = XInternAtom(xw.dpy, "_NET_WM_NAME", False);