version 1.22, 2017/07/26 16:16:25 |
version 1.23, 2017/08/16 11:46:08 |
|
|
int flag; |
int flag; |
|
|
/* |
/* |
* We have found an alert (bell, activity or silence), so we need |
* We have found an alert (bell, activity or silence), so we need to |
* to notify the user. For each client attached to this session, |
* pass it on to the user. For each client attached to this session, |
* decide whether a bell (or visual message) is needed. |
* decide whether a bell (or visual message) is needed. |
* |
* |
* {bell,activity,silence}-action determines when we notify: none means |
* {bell,activity,silence}-action determines when we alert: none means |
* nothing happens, current means we only do something for the current |
* nothing happens, current means we only do something for the current |
* window and other means only for windows other than the current. |
* window and other means only for windows other than the current. |
* |
* |
|
|
* mean both a bell and visual message is sent. |
* mean both a bell and visual message is sent. |
*/ |
*/ |
|
|
if (action == BELL_NONE) |
if (action == ALERT_NONE) |
return; |
return; |
TAILQ_FOREACH(c, &clients, entry) { |
TAILQ_FOREACH(c, &clients, entry) { |
if (c->session != s || c->flags & CLIENT_CONTROL) |
if (c->session != s || c->flags & CLIENT_CONTROL) |
continue; |
continue; |
flag = 0; |
flag = 0; |
if (action == BELL_ANY) |
if (action == ALERT_ANY) |
flag = 1; |
flag = 1; |
else if (action == BELL_CURRENT) |
else if (action == ALERT_CURRENT) |
flag = (c->session->curw->window == w); |
flag = (c->session->curw->window == w); |
else if (action == BELL_OTHER) |
else if (action == ALERT_OTHER) |
flag = (c->session->curw->window != w); |
flag = (c->session->curw->window != w); |
if (!flag) |
if (!flag) |
continue; |
continue; |