dwm

Mahdi's build of dwm
git clone git://mahdi.pw/dwm.git
Log | Files | Refs | README | LICENSE

dwm-attachbottom-20201227-61bb8b2.diff (1743B)


      1 From eea05f94baf707114ea882e8755520ba30d73cb2 Mon Sep 17 00:00:00 2001
      2 From: Szabolcs Szucs <[email protected]>
      3 Date: Sat, 26 Dec 2020 21:17:40 +0100
      4 Subject: [PATCH] attachbottom patch
      5 
      6 ---
      7  dwm.c | 16 +++++++++++++---
      8  1 file changed, 13 insertions(+), 3 deletions(-)
      9 
     10 diff --git a/dwm.c b/dwm.c
     11 index 664c527..7ee3566 100644
     12 --- a/dwm.c
     13 +++ b/dwm.c
     14 @@ -147,6 +147,7 @@ static int applysizehints(Client *c, int *x, int *y, int *w, int *h, int interac
     15  static void arrange(Monitor *m);
     16  static void arrangemon(Monitor *m);
     17  static void attach(Client *c);
     18 +static void attachbottom(Client *c);
     19  static void attachstack(Client *c);
     20  static void buttonpress(XEvent *e);
     21  static void checkotherwm(void);
     22 @@ -407,6 +408,15 @@ attach(Client *c)
     23  	c->mon->clients = c;
     24  }
     25  
     26 +void
     27 +attachbottom(Client *c)
     28 +{
     29 +	Client **tc;
     30 +	c->next = NULL;
     31 +	for (tc = &c->mon->clients; *tc; tc = &(*tc)->next);
     32 +	*tc = c;
     33 +}
     34 +
     35  void
     36  attachstack(Client *c)
     37  {
     38 @@ -1063,7 +1073,7 @@ manage(Window w, XWindowAttributes *wa)
     39  		c->isfloating = c->oldstate = trans != None || c->isfixed;
     40  	if (c->isfloating)
     41  		XRaiseWindow(dpy, c->win);
     42 -	attach(c);
     43 +	attachbottom(c);
     44  	attachstack(c);
     45  	XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 32, PropModeAppend,
     46  		(unsigned char *) &(c->win), 1);
     47 @@ -1418,7 +1428,7 @@ sendmon(Client *c, Monitor *m)
     48  	detachstack(c);
     49  	c->mon = m;
     50  	c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */
     51 -	attach(c);
     52 +	attachbottom(c);
     53  	attachstack(c);
     54  	focus(NULL);
     55  	arrange(NULL);
     56 @@ -1900,7 +1910,7 @@ updategeom(void)
     57  					m->clients = c->next;
     58  					detachstack(c);
     59  					c->mon = mons;
     60 -					attach(c);
     61 +					attachbottom(c);
     62  					attachstack(c);
     63  				}
     64  				if (m == selmon)
     65 -- 
     66 2.29.2
     67