Client* c = client_get(e->xbutton.window);
if (c && (ev->window == c->frame))
{
- if (ev->button == Button1) {
+ if (ev->button == Button1)
+ {
client_raise(c);
X.start_x = ev->x_root;
X.start_y = ev->y_root;
X.reshaping = 1;
warp_mouse(c);
}
- } else if (ev->button == Button2) {
+ }
+ else if (ev->button == Button2)
+ {
client_close(c);
- } else if (ev->button == Button3) {
+ }
+ else if (ev->button == Button3)
+ {
client_lower(c);
}
}
static void xunmapnotify(XEvent* e)
{
- (void)e;
+ XUnmapEvent* ev = &(e->xunmap);
+ Client* c = client_get(ev->window);
+ if (c && c->win == ev->window)
+ {
+ XUnmapWindow(X.disp, c->frame);
+ }
}
static void xdestroynotify(XEvent* e)