static Bool applysizehints(Client *c, int *x, int *y, int *w, int *h, Bool interact);
static void arrange(Monitor *m);
static void arrangemon(Monitor *m);
+static void attach_as_master(Client *c);
static void attach(Client *c);
static void attachstack(Client *c);
static void buttonpress(XEvent *e);
}
void
+attach_as_master(Client *c) {
+ c->next = c->mon->clients;
+ c->mon->clients = c;
+}
+void
attach(Client *c) {
if (c->mon->sel) {
c->next = c->mon->sel->next;
c->mon->sel->next = c;
} else {
- c->next = c->mon->clients;
- c->mon->clients = c;
+ attach_as_master(c);
}
}
void
pop(Client *c) {
detach(c);
- attach(c);
+ attach_as_master(c);
focus(c);
arrange(c->mon);
}