--- a/dwm.c Sun Aug 16 21:39:24 2009 +0100 +++ b/dwm.c Tue Aug 18 15:42:55 2009 +0100 @@ -1235,7 +1235,7 @@ } if(ev->atom == XA_WM_NAME || ev->atom == netatom[NetWMName]) { updatetitle(c); - if(c == selmon->sel) + if(c == c->mon->sel) drawbars(); } }