+ else {
+ c->x = c->rx;
+ c->y = c->ry;
+ c->w = c->rw;
+ c->h = c->rh;
+ }
+ resize(c, True, TopLeft);
+ while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
+}
+
+static Client *
+topofstack() {
+ Client *c;
+ unsigned int i;
+
+ for(c = nexttiled(clients), i = 0; c && i < nmaster; c = nexttiled(c->next), i++);
+ return (i < nmaster) ? NULL : c;