set cursor

This commit is contained in:
Nishi 2025-12-08 14:42:46 +09:00
commit c612d0519d
Signed by: nishi
GPG key ID: 27EF69B208EB9343

View file

@ -71,6 +71,7 @@ static void set_focus(Window w) {
int init_x(void) {
void* old;
XSetWindowAttributes xswa;
Cursor cur;
xswa.override_redirect = True;
@ -91,6 +92,10 @@ int init_x(void) {
XChangeProperty(xdisplay, nofocus, XInternAtom(xdisplay, "_NET_SUPPORTING_WM_CHECK", False), XA_WINDOW, 32, PropModeReplace, (unsigned char*)&nofocus, 1);
XChangeProperty(xdisplay, nofocus, XInternAtom(xdisplay, "_NET_WM_NAME", False), XInternAtom(xdisplay, "UTF8_STRING", False), 8, PropModeReplace, (unsigned char*)"milkwm", 6);
cur = MwLLX11CreateCursor(xdisplay, &MwCursorDefault, &MwCursorDefaultMask);
XDefineCursor(xdisplay, DefaultRootWindow(xdisplay), cur);
XFreeCursor(xdisplay, cur);
milkwm_set_focus = XInternAtom(xdisplay, "MILKWM_SET_FOCUS", False);
pthread_mutex_init(&xmutex, NULL);