X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=st.c;h=d528828966a023ed8e6a7bcebb828b085cda3107;hb=0a208cb6168a0acc9b5692b84ef061b25a5e81f1;hp=2be6772539647d56b1fb132e38c82d703792821d;hpb=e8b18dd97b34d29670484b3850c315213f01dfa5;p=st.git diff --git a/st.c b/st.c index 2be6772..d528828 100644 --- a/st.c +++ b/st.c @@ -16,10 +16,11 @@ #include #include #include -#include #include -#include +#include #include +#include +#include #if defined(__linux) #include @@ -1503,6 +1504,7 @@ initfonts(char *fontstr, char *bfontstr) void xinit(void) { XSetWindowAttributes attrs; + Cursor cursor; if(!(xw.dpy = XOpenDisplay(NULL))) die("Can't open display\n"); @@ -1550,6 +1552,13 @@ xinit(void) { /* gc */ dc.gc = XCreateGC(xw.dpy, xw.win, 0, NULL); + /* white cursor, black outline */ + cursor = XCreateFontCursor(xw.dpy, XC_xterm); + XDefineCursor(xw.dpy, xw.win, cursor); + XRecolorCursor(xw.dpy, cursor, + &(XColor){.red = 0xffff, .green = 0xffff, .blue = 0xffff}, + &(XColor){.red = 0x0000, .green = 0x0000, .blue = 0x0000}); + XMapWindow(xw.dpy, xw.win); xhints(); XStoreName(xw.dpy, xw.win, opt_title ? opt_title : "st");