Apply attachbottom
This commit is contained in:
parent
100fed48d9
commit
52a87a26ad
21
dwm.c
21
dwm.c
@ -199,6 +199,8 @@ arrangemon(Monitor* m);
|
||||
static void
|
||||
attach(Client* c);
|
||||
static void
|
||||
attachbottom(Client* c);
|
||||
static void
|
||||
attachstack(Client* c);
|
||||
static void
|
||||
buttonpress(XEvent* e);
|
||||
@ -551,6 +553,19 @@ attach(Client* c)
|
||||
c->mon->clients = c;
|
||||
}
|
||||
|
||||
void
|
||||
attachbottom(Client* c)
|
||||
{
|
||||
c->next = NULL;
|
||||
Client* below = c->mon->clients;
|
||||
if (below) {
|
||||
for(; below->next; below = below->next);
|
||||
below->next = c;
|
||||
}
|
||||
else
|
||||
c->mon->clients = c;
|
||||
}
|
||||
|
||||
void
|
||||
attachstack(Client* c)
|
||||
{
|
||||
@ -1281,7 +1296,7 @@ manage(Window w, XWindowAttributes* wa)
|
||||
c->isfloating = c->oldstate = trans != None || c->isfixed;
|
||||
if (c->isfloating)
|
||||
XRaiseWindow(dpy, c->win);
|
||||
attach(c);
|
||||
attachbottom(c);
|
||||
attachstack(c);
|
||||
XChangeProperty(dpy,
|
||||
root,
|
||||
@ -1679,7 +1694,7 @@ sendmon(Client* c, Monitor* m)
|
||||
detachstack(c);
|
||||
c->mon = m;
|
||||
c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */
|
||||
attach(c);
|
||||
attachbottom(c);
|
||||
attachstack(c);
|
||||
focus(NULL);
|
||||
arrange(NULL);
|
||||
@ -2242,7 +2257,7 @@ updategeom(void)
|
||||
m->clients = c->next;
|
||||
detachstack(c);
|
||||
c->mon = mons;
|
||||
attach(c);
|
||||
attachbottom(c);
|
||||
attachstack(c);
|
||||
}
|
||||
if (m == selmon)
|
||||
|
Loading…
Reference in New Issue
Block a user