sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

dwm-attachbottom-6.1.diff (1589B)


      1 Binary files dwm/drw.o and dwm.patched/drw.o differ
      2 Binary files dwm/dwm and dwm.patched/dwm differ
      3 diff -ruN dwm/dwm.c dwm.patched/dwm.c
      4 --- dwm/dwm.c	2018-05-22 20:05:47.208417141 -0700
      5 +++ dwm.patched/dwm.c	2018-06-20 15:08:07.380496725 -0700
      6 @@ -147,6 +147,7 @@
      7  static void arrange(Monitor *m);
      8  static void arrangemon(Monitor *m);
      9  static void attach(Client *c);
     10 +static void attachbelow(Client *c);
     11  static void attachstack(Client *c);
     12  static void buttonpress(XEvent *e);
     13  static void checkotherwm(void);
     14 @@ -407,6 +408,17 @@
     15  }
     16  
     17  void
     18 +attachbelow(Client *c)
     19 +{
     20 +	Client *below = c->mon->clients;
     21 +	for (; below && below->next; below = below->next);
     22 +	if (below)
     23 +		below->next = c;
     24 +	else
     25 +		c->mon->clients = c;
     26 +}
     27 +
     28 +void
     29  attachstack(Client *c)
     30  {
     31  	c->snext = c->mon->stack;
     32 @@ -1065,7 +1077,7 @@
     33  		c->isfloating = c->oldstate = trans != None || c->isfixed;
     34  	if (c->isfloating)
     35  		XRaiseWindow(dpy, c->win);
     36 -	attach(c);
     37 +	attachbelow(c);
     38  	attachstack(c);
     39  	XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 32, PropModeAppend,
     40  		(unsigned char *) &(c->win), 1);
     41 @@ -1420,7 +1432,7 @@
     42  	detachstack(c);
     43  	c->mon = m;
     44  	c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */
     45 -	attach(c);
     46 +	attachbelow(c);
     47  	attachstack(c);
     48  	focus(NULL);
     49  	arrange(NULL);
     50 @@ -1900,7 +1912,7 @@
     51  					m->clients = c->next;
     52  					detachstack(c);
     53  					c->mon = mons;
     54 -					attach(c);
     55 +					attachbelow(c);
     56  					attachstack(c);
     57  				}
     58  				if (m == selmon)
     59 Binary files dwm/dwm.o and dwm.patched/dwm.o differ
     60 Binary files dwm/util.o and dwm.patched/util.o differ