Lines Matching refs:wl
71 alerts_action_applies(struct winlink *wl, const char *name) in alerts_action_applies() argument
81 action = options_get_number(wl->session->options, name); in alerts_action_applies()
85 return (wl == wl->session->curw); in alerts_action_applies()
87 return (wl != wl->session->curw); in alerts_action_applies()
105 struct winlink *wl; in alerts_check_session() local
107 RB_FOREACH(wl, winlinks, &s->windows) in alerts_check_session()
108 alerts_check_all(wl->window); in alerts_check_session()
185 struct winlink *wl; in alerts_check_bell() local
193 TAILQ_FOREACH(wl, &w->winlinks, wentry) in alerts_check_bell()
194 wl->session->flags &= ~SESSION_ALERTED; in alerts_check_bell()
196 TAILQ_FOREACH(wl, &w->winlinks, wentry) { in alerts_check_bell()
201 s = wl->session; in alerts_check_bell()
202 if (s->curw != wl || s->attached == 0) { in alerts_check_bell()
203 wl->flags |= WINLINK_BELL; in alerts_check_bell()
206 if (!alerts_action_applies(wl, "bell-action")) in alerts_check_bell()
208 notify_winlink("alert-bell", wl); in alerts_check_bell()
214 alerts_set_message(wl, "Bell", "visual-bell"); in alerts_check_bell()
223 struct winlink *wl; in alerts_check_activity() local
231 TAILQ_FOREACH(wl, &w->winlinks, wentry) in alerts_check_activity()
232 wl->session->flags &= ~SESSION_ALERTED; in alerts_check_activity()
234 TAILQ_FOREACH(wl, &w->winlinks, wentry) { in alerts_check_activity()
235 if (wl->flags & WINLINK_ACTIVITY) in alerts_check_activity()
237 s = wl->session; in alerts_check_activity()
238 if (s->curw != wl || s->attached == 0) { in alerts_check_activity()
239 wl->flags |= WINLINK_ACTIVITY; in alerts_check_activity()
242 if (!alerts_action_applies(wl, "activity-action")) in alerts_check_activity()
244 notify_winlink("alert-activity", wl); in alerts_check_activity()
250 alerts_set_message(wl, "Activity", "visual-activity"); in alerts_check_activity()
259 struct winlink *wl; in alerts_check_silence() local
267 TAILQ_FOREACH(wl, &w->winlinks, wentry) in alerts_check_silence()
268 wl->session->flags &= ~SESSION_ALERTED; in alerts_check_silence()
270 TAILQ_FOREACH(wl, &w->winlinks, wentry) { in alerts_check_silence()
271 if (wl->flags & WINLINK_SILENCE) in alerts_check_silence()
273 s = wl->session; in alerts_check_silence()
274 if (s->curw != wl || s->attached == 0) { in alerts_check_silence()
275 wl->flags |= WINLINK_SILENCE; in alerts_check_silence()
278 if (!alerts_action_applies(wl, "silence-action")) in alerts_check_silence()
280 notify_winlink("alert-silence", wl); in alerts_check_silence()
286 alerts_set_message(wl, "Silence", "visual-silence"); in alerts_check_silence()
293 alerts_set_message(struct winlink *wl, const char *type, const char *option) in alerts_set_message() argument
308 visual = options_get_number(wl->session->options, option); in alerts_set_message()
310 if (c->session != wl->session || c->flags & CLIENT_CONTROL) in alerts_set_message()
317 if (c->session->curw == wl) { in alerts_set_message()
322 wl->idx); in alerts_set_message()