Fix generation of extra FocusTag events on view change.

This commit is contained in:
Kris Maglione 2006-06-23 19:39:00 -04:00
parent 460e21c9c0
commit a979c86bb2
1 changed files with 7 additions and 5 deletions

View File

@ -14,13 +14,15 @@ static char buf[256];
static void
assign_sel_view(View *v)
{
if(sel && sel != v) {
snprintf(buf, sizeof(buf), "UnfocusTag %s\n", sel->name);
if(sel != v) {
if(sel) {
snprintf(buf, sizeof(buf), "UnfocusTag %s\n", sel->name);
write_event(buf);
}
sel = v;
snprintf(buf, sizeof(buf), "FocusTag %s\n", sel->name);
write_event(buf);
}
sel = v;
snprintf(buf, sizeof(buf), "FocusTag %s\n", sel->name);
write_event(buf);
}
View *