return 0;
XSendEvent(win->sys->dpy, win->sys->xid, False, NoEventMask, &(XEvent){
- .type = ClientMessage,
+ .xclient.type = ClientMessage,
.xclient.window = win->sys->xid,
.xclient.message_type = atoms[WM_PROTO],
.xclient.format = 32,
printf("map_req: %lx\n", xe->xmaprequest.window);
win = win_find(dpy,xe->xmaprequest.window,1);
// fixme, for hide -> max, etc
- if (win->state == ST_HIDE)
+ if (win->state == ST_HIDE) {
+ wm_handle_state(win, win->state, ST_SHOW);
win->state = ST_SHOW;
+ }
sys_show(win, win->state);
}
else if (type == ClientMessage) {
/* 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;
XSetErrorHandler(xerror);
XUngrabServer(win->sys->dpy);
}
- XDestroyWindow(win->sys->dpy, win->sys->xid);
break;
}
win->state = state;