X.start_y = ev->y_root;
}
-
static void xconfigrequest(XEvent* e)
{
- (void)e;
+ XConfigureRequestEvent* ev = &(e->xconfigurerequest);
+ XWindowChanges wc;
+ wc.x = ev->x;
+ wc.y = ev->y;
+ wc.width = ev->width;
+ wc.height = ev->height;
+ wc.border_width = ev->border_width;
+ wc.sibling = ev->above;
+ wc.stack_mode = ev->detail;
+ XConfigureWindow(X.disp, ev->window, ev->value_mask, &wc);
}
static void xmaprequest(XEvent* e)
{
- (void)e;
+ XMapRequestEvent* ev = &(e->xmaprequest);
+ XWindowAttributes attr;
+ if (!client_get(ev->window))
+ {
+ if (XGetWindowAttributes(X.disp, ev->window, &attr) && !attr.override_redirect)
+ {
+ (void)client_add(ev->window, &attr);
+ }
+ }
}
static void xunmapnotify(XEvent* e)
if (c)
{
client_focus(c);
-// XSetInputFocus(X.disp, c->win, RevertToPointerRoot, CurrentTime);
-// client_draw(c, 0);
}
}