version 1.241, 2017/07/14 08:04:23 |
version 1.242, 2017/08/16 12:12:54 |
|
|
|
|
/* Set identify mode on client. */ |
/* Set identify mode on client. */ |
void |
void |
server_client_set_identify(struct client *c) |
server_client_set_identify(struct client *c, u_int delay) |
{ |
{ |
struct timeval tv; |
struct timeval tv; |
int delay; |
|
|
|
delay = options_get_number(c->session->options, "display-panes-time"); |
|
tv.tv_sec = delay / 1000; |
tv.tv_sec = delay / 1000; |
tv.tv_usec = (delay % 1000) * 1000L; |
tv.tv_usec = (delay % 1000) * 1000L; |
|
|
if (event_initialized(&c->identify_timer)) |
if (event_initialized(&c->identify_timer)) |
evtimer_del(&c->identify_timer); |
evtimer_del(&c->identify_timer); |
evtimer_set(&c->identify_timer, server_client_callback_identify, c); |
evtimer_set(&c->identify_timer, server_client_callback_identify, c); |
evtimer_add(&c->identify_timer, &tv); |
if (delay != 0) |
|
evtimer_add(&c->identify_timer, &tv); |
|
|
c->flags |= CLIENT_IDENTIFY; |
c->flags |= CLIENT_IDENTIFY; |
c->tty.flags |= (TTY_FREEZE|TTY_NOCURSOR); |
c->tty.flags |= (TTY_FREEZE|TTY_NOCURSOR); |