Commits

Jason Ryan committed be53270

Raziel's patch to pull to master

  • Participants
  • Parent commits f6dd5ee

Comments (0)

Files changed (2)

+# HG changeset patch
+# Parent 7c322e64af1702eff6ba594e60129f2d758930ed
+
+diff -r 7c322e64af17 dwm.c
+--- a/dwm.c	Tue May 21 09:52:20 2013 +1200
++++ b/dwm.c	Tue May 21 10:25:40 2013 +1200
+@@ -1755,10 +1755,20 @@
+ void
+ toggleview(const Arg *arg) {
+ 	unsigned int newtagset = selmon->tagset[selmon->seltags] ^ (arg->ui & TAGMASK);
++	Client *c = NULL;
++	unsigned int found = 0;
+ 
+ 	if(newtagset) {
+ 		selmon->tagset[selmon->seltags] = newtagset;
+-		focus(NULL);
++
++		for(c = selmon->clients; c && !(found = c->tags & arg->ui); c = c->next);
++		if(found && ISVISIBLE(c)) {
++			detach(c);
++			attach(c);
++			focus(c);
++		}
++		else
++			focus(NULL);
+ 		arrange(selmon);
+ 	}
+ }
 setup.makefile
 base.config.customizations
+new_master
 statuscolours
 cycle
 push
-fibonacci #-block
-shiv.config #-block
+fibonacci 
+shiv.config 
 centurion.config #-block
-veles.config
+veles.config #-block