wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit a979c86bb24d0b9f47a6716af07e676b34fddfa9
parent 460e21c9c019690fcd9bc97d772cf61a30f3a808
Author: Kris Maglione <bsdaemon@wmii.de>
Date:   Fri, 23 Jun 2006 19:39:00 -0400

Fix generation of extra FocusTag events on view change.


Diffstat:
cmd/wm/view.c | 12+++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/cmd/wm/view.c b/cmd/wm/view.c @@ -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 *