mirror of
https://github.com/tmux/tmux.git
synced 2025-09-08 23:24:18 +00:00
Support for individual session idle time locking. May be enabled by turning off
the lock-server option (it is on by default). When this is off, each session locks when it has been idle for the lock-after-time setting. When on, the entire server locks when ALL sessions have been idle for their individual lock-after-time settings. This replaces one global-only option (lock-after-time) with another (lock-server), but the default behaviour is usually preferable so there don't seem to be many alternatives. Diff/idea largely from Thomas Adam, tweaked by me.
This commit is contained in:
@ -105,7 +105,8 @@ server_msg_dispatch(struct client *c)
|
||||
tty_start_tty(&c->tty);
|
||||
server_redraw_client(c);
|
||||
recalculate_sizes();
|
||||
server_activity = time(NULL);
|
||||
if (c->session != NULL)
|
||||
c->session->activity = time(NULL);
|
||||
break;
|
||||
case MSG_ENVIRON:
|
||||
if (datalen != sizeof environdata)
|
||||
@ -181,7 +182,8 @@ server_msg_command(struct client *c, struct msg_command_data *data)
|
||||
int argc;
|
||||
char **argv, *cause;
|
||||
|
||||
server_activity = time(NULL);
|
||||
if (c->session != NULL)
|
||||
c->session->activity = time(NULL);
|
||||
|
||||
ctx.error = server_msg_command_error;
|
||||
ctx.print = server_msg_command_print;
|
||||
|
Reference in New Issue
Block a user