sites

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

dwm-6.1-tagintostack-onemaster.diff (568B)


      1 diff --git a/dwm.c b/dwm.c
      2 index 1bbb4b3..6dfad66 100644
      3 --- a/dwm.c
      4 +++ b/dwm.c
      5 @@ -1664,6 +1664,15 @@ void
      6  toggleview(const Arg *arg) {
      7  	unsigned int newtagset = selmon->tagset[selmon->seltags] ^ (arg->ui & TAGMASK);
      8  
      9 +	// the first visible client should be the same after we add a new tag
     10 +	// we also want to be sure not to mutate the focus
     11 +	Client *const c = nexttiled(selmon->clients);
     12 +	if (c) {
     13 +		Client * const selected = selmon->sel;
     14 +		pop(c);
     15 +		focus(selected);
     16 +	}
     17 +
     18  	if(newtagset) {
     19  		selmon->tagset[selmon->seltags] = newtagset;
     20  		focus(NULL);