+ 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;