version 1.23, 2009/10/10 15:03:01 |
version 1.24, 2009/11/01 23:20:37 |
|
|
struct client *c; |
struct client *c; |
struct options *oo; |
struct options *oo; |
const struct set_option_entry *entry, *opt; |
const struct set_option_entry *entry, *opt; |
|
struct jobs *jobs; |
|
struct job *job, *nextjob; |
u_int i; |
u_int i; |
|
int try_again; |
|
|
if (data->chflags & CMD_CHFLAG('g')) |
if (data->chflags & CMD_CHFLAG('g')) |
oo = &global_s_options; |
oo = &global_s_options; |
|
|
} |
} |
|
|
recalculate_sizes(); |
recalculate_sizes(); |
for (i = 0; i < ARRAY_LENGTH(&clients); i++) { |
|
c = ARRAY_ITEM(&clients, i); |
/* |
if (c != NULL && c->session != NULL) { |
* Special-case: kill all persistent jobs if status-left, status-right |
job_tree_free(&c->status_jobs); |
* or set-titles-string have changed. Persistent jobs are only used by |
job_tree_init(&c->status_jobs); |
* the status line at the moment so this works XXX. |
|
*/ |
|
if (strcmp(entry->name, "status-left") == 0 || |
|
strcmp(entry->name, "status-right") == 0 || |
|
strcmp(entry->name, "set-titles-string") == 0) { |
|
for (i = 0; i < ARRAY_LENGTH(&clients); i++) { |
|
c = ARRAY_ITEM(&clients, i); |
|
if (c == NULL || c->session == NULL) |
|
continue; |
|
|
|
jobs = &c->status_jobs; |
|
do { |
|
try_again = 0; |
|
job = RB_ROOT(jobs); |
|
while (job != NULL) { |
|
nextjob = RB_NEXT(jobs, jobs, job); |
|
if (job->flags & JOB_PERSIST) { |
|
job_remove(jobs, job); |
|
try_again = 1; |
|
break; |
|
} |
|
job = nextjob; |
|
} |
|
} while (try_again); |
server_redraw_client(c); |
server_redraw_client(c); |
} |
} |
} |
} |