diff --git a/options-table.c b/options-table.c index 7f75d22c..b9431483 100644 --- a/options-table.c +++ b/options-table.c @@ -206,11 +206,6 @@ const struct options_table_entry session_options_table[] = { .default_str = "lock -np" }, - { .name = "lock-server", - .type = OPTIONS_TABLE_FLAG, - .default_num = 1 - }, - { .name = "message-attr", .type = OPTIONS_TABLE_ATTRIBUTES, .default_num = 0, diff --git a/server.c b/server.c index d39e3f56..f9b0dc52 100644 --- a/server.c +++ b/server.c @@ -64,7 +64,6 @@ void server_child_signal(void); void server_child_exited(pid_t, int); void server_child_stopped(pid_t, int); void server_second_callback(int, short, void *); -void server_lock_server(void); void server_lock_sessions(void); /* Set marked pane. */ @@ -506,10 +505,7 @@ server_second_callback(unused int fd, unused short events, unused void *arg) { struct timeval tv; - if (options_get_number(&global_s_options, "lock-server")) - server_lock_server(); - else - server_lock_sessions(); + server_lock_sessions(); evtimer_del(&server_ev_second); memset(&tv, 0, sizeof tv); @@ -517,27 +513,6 @@ server_second_callback(unused int fd, unused short events, unused void *arg) evtimer_add(&server_ev_second, &tv); } -/* Lock the server if ALL sessions have hit the time limit. */ -void -server_lock_server(void) -{ - struct session *s; - int timeout; - time_t t; - - t = time(NULL); - RB_FOREACH(s, sessions, &sessions) { - if (s->flags & SESSION_UNATTACHED) - continue; - timeout = options_get_number(&s->options, "lock-after-time"); - if (timeout <= 0 || t <= s->activity_time.tv_sec + timeout) - return; /* not timed out */ - } - - server_lock(); - recalculate_sizes(); -} - /* Lock any sessions which have timed out. */ void server_lock_sessions(void) diff --git a/tmux.1 b/tmux.1 index 19f2af36..8e07fc2a 100644 --- a/tmux.1 +++ b/tmux.1 @@ -2561,9 +2561,7 @@ Lock the session (like the .Ic lock-session command) after .Ar number -seconds of inactivity, or the entire server (all sessions) if the -.Ic lock-server -option is set. +seconds of inactivity. The default is not to lock (set to 0). .It Ic lock-command Ar shell-command Command to run when locking each client. @@ -2571,19 +2569,6 @@ The default is to run .Xr lock 1 with .Fl np . -.It Xo Ic lock-server -.Op Ic on | off -.Xc -If this option is -.Ic on -(the default), -instead of each session locking individually as each has been -idle for -.Ic lock-after-time , -the entire server will lock after -.Em all -sessions would have locked. -This has no effect as a session option; it must be set as a global option. .It Ic message-command-style Ar style Set status line message command style, where .Ar style