+ XGrabButton(dpy, Button1, Mod1Mask, c->win, False, ButtonPressMask,
+ GrabModeAsync, GrabModeSync, None, None);
+ XGrabButton(dpy, Button2, Mod1Mask, c->win, False, ButtonPressMask,
+ GrabModeAsync, GrabModeSync, None, None);
+ XGrabButton(dpy, Button3, Mod1Mask, c->win, False, ButtonPressMask,
+ GrabModeAsync, GrabModeSync, None, None);
+
+ if(!c->isfloat)
+ c->isfloat = trans
+ || ((c->maxw == c->minw) && (c->maxh == c->minh));
+
+ setgeom(c);
+ settitle(c);
+
+ arrange(NULL);
+
+ /* mapping the window now prevents flicker */
+ if(c->tags[tsel]) {
+ XMapRaised(dpy, c->win);
+ XMapRaised(dpy, c->title);
+ focus(c);
+ }
+ else {
+ ban(c);
+ XMapRaised(dpy, c->win);
+ XMapRaised(dpy, c->title);
+ XSync(dpy, False);
+ }
+}
+
+void
+maximize(Arg *arg)
+{
+ if(!sel)
+ return;
+ *sel->x = sx;
+ *sel->y = sy + bh;
+ *sel->w = sw - 2 * sel->border;
+ *sel->h = sh - 2 * sel->border - bh;
+ higher(sel);
+ resize(sel, False, TopLeft);
+}
+
+void
+pop(Client *c)
+{
+ Client **l;
+ for(l = &clients; *l && *l != c; l = &(*l)->next);
+ *l = c->next;
+
+ c->next = clients; /* pop */
+ clients = c;
+ arrange(NULL);