diff -r 00da7bf0bba7 dwm.c
--- a/dwm.c	Sat Dec 06 09:33:58 2008 +0000
+++ b/dwm.c	Sat Dec 06 13:31:04 2008 +0100
@@ -259,7 +259,7 @@
 			&& (!r->class || (ch.res_class && strstr(ch.res_class, r->class)))
 			&& (!r->instance || (ch.res_name && strstr(ch.res_name, r->instance)))) {
 				c->isfloating = r->isfloating;
-				c->tags |= r->tags & TAGMASK;
+				c->tags |= r->tags & TAGMASK ? r->tags & TAGMASK : tagset[seltags];
 			}
 		}
 		if(ch.res_class)
