Hi, a month ago i started using dwm. In my rules i send firefox clients to tag 2. Now, after starting dwm i am on tag 1 and after i started firefox via dmenu, i automatically get switched to tag 2. Right after starting dwm this is not that much of a problem, but when i have some work in progress and use both views (via mod+tab) and then start another application, which is not in the current tagset, i loose one of my views to the tags of the started application. Is there a particular reason for this behaviour?
I found it kind of annoying and so i patched it to just pull in the tags from the started application without switching view. It is pretty simple and also removes one line of code. Yay! --Markus
>From a9ce0f4f922bbc58ed0dcb26f546ddd7ed235078 Mon Sep 17 00:00:00 2001 From: Markus Teich <markus.te...@stusta.mhn.de> Date: Mon, 4 Mar 2013 10:53:53 +0100 Subject: [PATCH] don't switch view, if _NET_ACTIVE_WINDOW is received. this just pulls the tags of the corresponding client into the current view, so your secondary view is not lost. --- dwm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dwm.c b/dwm.c index d9443da..0cfc0d1 100644 --- a/dwm.c +++ b/dwm.c @@ -544,8 +544,7 @@ clientmessage(XEvent *e) { } else if(cme->message_type == netatom[NetActiveWindow]) { if(!ISVISIBLE(c)) { - c->mon->seltags ^= 1; - c->mon->tagset[c->mon->seltags] = c->tags; + c->mon->tagset[c->mon->seltags] |= c->tags; } pop(c); } -- 1.7.9.5