diff options
| author | Aurélien Aptel <aurelien.aptel@gmail.com> | 2010-12-12 13:32:13 +0100 | 
|---|---|---|
| committer | Aurélien Aptel <aurelien.aptel@gmail.com> | 2010-12-12 13:32:13 +0100 | 
| commit | 0d2e7feb3bc8e73284ef6a4064fc8a2c94ce49d7 (patch) | |
| tree | f111536025a6a22d461eca90fef98f4218bac46f | |
| parent | 77e8d5be181f51e73308408b89eaecac7cd63fb4 (diff) | |
| download | st-0d2e7feb3bc8e73284ef6a4064fc8a2c94ce49d7.tar.gz st-0d2e7feb3bc8e73284ef6a4064fc8a2c94ce49d7.tar.bz2 | |
change X cursor to "I".
| -rw-r--r-- | st.c | 13 | 
1 files changed, 11 insertions, 2 deletions
| @@ -16,10 +16,11 @@  #include <sys/types.h>  #include <sys/wait.h>  #include <unistd.h> -#include <X11/Xlib.h>  #include <X11/Xatom.h> -#include <X11/keysym.h> +#include <X11/Xlib.h>  #include <X11/Xutil.h> +#include <X11/cursorfont.h> +#include <X11/keysym.h>  #if   defined(__linux)   #include <pty.h> @@ -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"); | 
