=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/Attic/server-window.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- src/usr.bin/tmux/Attic/server-window.c 2013/03/21 18:47:01 1.28 +++ src/usr.bin/tmux/Attic/server-window.c 2014/02/14 12:44:45 1.29 @@ -1,4 +1,4 @@ -/* $OpenBSD: server-window.c,v 1.28 2013/03/21 18:47:01 nicm Exp $ */ +/* $OpenBSD: server-window.c,v 1.29 2014/02/14 12:44:45 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -76,7 +76,7 @@ wl->flags |= WINLINK_BELL; if (s->flags & SESSION_UNATTACHED) return (0); - if (s->curw->window == wl->window) + if (s->curw->window == w) w->flags &= ~WINDOW_BELL; visual = options_get_number(&s->options, "visual-bell"); @@ -93,10 +93,8 @@ } if (c->session->curw->window == w) status_message_set(c, "Bell in current window"); - else if (action == BELL_ANY) { - status_message_set(c, "Bell in window %u", - winlink_find_by_window(&s->windows, w)->idx); - } + else if (action == BELL_ANY) + status_message_set(c, "Bell in window %u", wl->idx); } return (1); @@ -110,7 +108,7 @@ struct window *w = wl->window; u_int i; - if (s->curw->window == wl->window) + if (s->curw->window == w) w->flags &= ~WINDOW_ACTIVITY; if (!(w->flags & WINDOW_ACTIVITY) || wl->flags & WINLINK_ACTIVITY) @@ -130,8 +128,7 @@ c = ARRAY_ITEM(&clients, i); if (c == NULL || c->session != s) continue; - status_message_set(c, "Activity in window %u", - winlink_find_by_window(&s->windows, w)->idx); + status_message_set(c, "Activity in window %u", wl->idx); } } @@ -182,8 +179,7 @@ c = ARRAY_ITEM(&clients, i); if (c == NULL || c->session != s) continue; - status_message_set(c, "Silence in window %u", - winlink_find_by_window(&s->windows, w)->idx); + status_message_set(c, "Silence in window %u", wl->idx); } } @@ -225,8 +221,7 @@ c = ARRAY_ITEM(&clients, i); if (c == NULL || c->session != s) continue; - status_message_set(c, "Content in window %u", - winlink_find_by_window(&s->windows, w)->idx); + status_message_set(c, "Content in window %u", wl->idx); } }