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
|
static void
|
||||||
attach(Client* c);
|
attach(Client* c);
|
||||||
static void
|
static void
|
||||||
|
attachbottom(Client* c);
|
||||||
|
static void
|
||||||
attachstack(Client* c);
|
attachstack(Client* c);
|
||||||
static void
|
static void
|
||||||
buttonpress(XEvent* e);
|
buttonpress(XEvent* e);
|
||||||
@ -551,6 +553,19 @@ attach(Client* c)
|
|||||||
c->mon->clients = 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
|
void
|
||||||
attachstack(Client* c)
|
attachstack(Client* c)
|
||||||
{
|
{
|
||||||
@ -1281,7 +1296,7 @@ manage(Window w, XWindowAttributes* wa)
|
|||||||
c->isfloating = c->oldstate = trans != None || c->isfixed;
|
c->isfloating = c->oldstate = trans != None || c->isfixed;
|
||||||
if (c->isfloating)
|
if (c->isfloating)
|
||||||
XRaiseWindow(dpy, c->win);
|
XRaiseWindow(dpy, c->win);
|
||||||
attach(c);
|
attachbottom(c);
|
||||||
attachstack(c);
|
attachstack(c);
|
||||||
XChangeProperty(dpy,
|
XChangeProperty(dpy,
|
||||||
root,
|
root,
|
||||||
@ -1679,7 +1694,7 @@ sendmon(Client* c, Monitor* m)
|
|||||||
detachstack(c);
|
detachstack(c);
|
||||||
c->mon = m;
|
c->mon = m;
|
||||||
c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */
|
c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */
|
||||||
attach(c);
|
attachbottom(c);
|
||||||
attachstack(c);
|
attachstack(c);
|
||||||
focus(NULL);
|
focus(NULL);
|
||||||
arrange(NULL);
|
arrange(NULL);
|
||||||
@ -2242,7 +2257,7 @@ updategeom(void)
|
|||||||
m->clients = c->next;
|
m->clients = c->next;
|
||||||
detachstack(c);
|
detachstack(c);
|
||||||
c->mon = mons;
|
c->mon = mons;
|
||||||
attach(c);
|
attachbottom(c);
|
||||||
attachstack(c);
|
attachstack(c);
|
||||||
}
|
}
|
||||||
if (m == selmon)
|
if (m == selmon)
|
||||||
|
Loading…
Reference in New Issue
Block a user