The win_msg function initializes a union.. Apparently since XEvent is a
union the implied .xclient.type = 0 overrode the explicit .type =
ClientMessage.
Note: setting focus on gtk windows causes key presses to be missed for
some reason.. so comment that out for now.
return 0;
XSendEvent(win->sys->dpy, win->sys->xid, False, NoEventMask, &(XEvent){
return 0;
XSendEvent(win->sys->dpy, win->sys->xid, False, NoEventMask, &(XEvent){
+ .xclient.type = ClientMessage,
.xclient.window = win->sys->xid,
.xclient.message_type = atoms[WM_PROTO],
.xclient.format = 32,
.xclient.window = win->sys->xid,
.xclient.message_type = atoms[WM_PROTO],
.xclient.format = 32,
/* Set actual focus */
XSetInputFocus(win->sys->dpy, win->sys->xid,
RevertToPointerRoot, CurrentTime);
/* Set actual focus */
XSetInputFocus(win->sys->dpy, win->sys->xid,
RevertToPointerRoot, CurrentTime);
- win_msg(win, WM_FOCUS);
+ //win_msg(win, WM_FOCUS);
/* Set border on focused window */
static win_t *last = NULL;
/* Set border on focused window */
static win_t *last = NULL;
XSetErrorHandler(xerror);
XUngrabServer(win->sys->dpy);
}
XSetErrorHandler(xerror);
XUngrabServer(win->sys->dpy);
}
- XDestroyWindow(win->sys->dpy, win->sys->xid);
break;
}
win->state = state;
break;
}
win->state = state;