| dwm-attachbottom-6.3.diff - sites - public wiki contents of suckless.org | |
| git clone git://git.suckless.org/sites | |
| Log | |
| Files | |
| Refs | |
| --- | |
| dwm-attachbottom-6.3.diff (1507B) | |
| --- | |
| 1 diff -up dwm-6.3/dwm.c dwm-6.3-attachbottom/dwm.c | |
| 2 --- dwm-6.3/dwm.c 2022-01-07 12:42:18.000000000 +0100 | |
| 3 +++ dwm-6.3-attachbottom/dwm.c 2022-08-17 22:14:41.813809073 +0200 | |
| 4 @@ -147,6 +147,7 @@ static int applysizehints(Client *c, int | |
| 5 static void arrange(Monitor *m); | |
| 6 static void arrangemon(Monitor *m); | |
| 7 static void attach(Client *c); | |
| 8 +static void attachbottom(Client *c); | |
| 9 static void attachstack(Client *c); | |
| 10 static void buttonpress(XEvent *e); | |
| 11 static void checkotherwm(void); | |
| 12 @@ -408,6 +409,15 @@ attach(Client *c) | |
| 13 } | |
| 14 | |
| 15 void | |
| 16 +attachbottom(Client *c) | |
| 17 +{ | |
| 18 + Client **tc; | |
| 19 + c->next = NULL; | |
| 20 + for (tc = &c->mon->clients; *tc; tc = &(*tc)->next); | |
| 21 + *tc = c; | |
| 22 +} | |
| 23 + | |
| 24 +void | |
| 25 attachstack(Client *c) | |
| 26 { | |
| 27 c->snext = c->mon->stack; | |
| 28 @@ -1066,7 +1076,7 @@ manage(Window w, XWindowAttributes *wa) | |
| 29 c->isfloating = c->oldstate = trans != None || c->isfix… | |
| 30 if (c->isfloating) | |
| 31 XRaiseWindow(dpy, c->win); | |
| 32 - attach(c); | |
| 33 + attachbottom(c); | |
| 34 attachstack(c); | |
| 35 XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 3… | |
| 36 (unsigned char *) &(c->win), 1); | |
| 37 @@ -1421,7 +1431,7 @@ sendmon(Client *c, Monitor *m) | |
| 38 detachstack(c); | |
| 39 c->mon = m; | |
| 40 c->tags = m->tagset[m->seltags]; /* assign tags of target monit… | |
| 41 - attach(c); | |
| 42 + attachbottom(c); | |
| 43 attachstack(c); | |
| 44 focus(NULL); | |
| 45 arrange(NULL); | |
| 46 @@ -1903,7 +1913,7 @@ updategeom(void) | |
| 47 m->clients = c->next; | |
| 48 detachstack(c); | |
| 49 c->mon = mons; | |
| 50 - attach(c); | |
| 51 + attachbottom(c); | |
| 52 attachstack(c); | |
| 53 } | |
| 54 if (m == selmon) |