diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2020-11-03 08:35:52 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2020-11-03 08:35:52 +0000 |
commit | ba9962b568dd111455963c88b0458cf8847c9690 (patch) | |
tree | a13a66498befbd75237a3a7a3869ccd2c52b8452 /status.c | |
parent | 733abfcfc5b05cb3e1f2cf08f00a9325c6f6fa04 (diff) | |
parent | ff53eed402abb146096673963da39b5036a5c861 (diff) | |
download | rtmux-ba9962b568dd111455963c88b0458cf8847c9690.tar.gz rtmux-ba9962b568dd111455963c88b0458cf8847c9690.tar.bz2 rtmux-ba9962b568dd111455963c88b0458cf8847c9690.zip |
Merge branch 'master' into 3.2-rc
Diffstat (limited to 'status.c')
-rw-r--r-- | status.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -423,11 +423,11 @@ status_redraw(struct client *c) /* Set a status line message. */ void -status_message_set(struct client *c, int ignore_styles, const char *fmt, ...) +status_message_set(struct client *c, int delay, int ignore_styles, + const char *fmt, ...) { struct timeval tv; va_list ap; - int delay; status_message_clear(c); status_push_screen(c); @@ -439,7 +439,12 @@ status_message_set(struct client *c, int ignore_styles, const char *fmt, ...) server_add_message("%s message: %s", c->name, c->message_string); - delay = options_get_number(c->session->options, "display-time"); + /* + * With delay -1, the display-time option is used; zero means wait for + * key press; more than zero is the actual delay time in milliseconds. + */ + if (delay == -1) + delay = options_get_number(c->session->options, "display-time"); if (delay > 0) { tv.tv_sec = delay / 1000; tv.tv_usec = (delay % 1000) * 1000L; @@ -447,6 +452,7 @@ status_message_set(struct client *c, int ignore_styles, const char *fmt, ...) if (event_initialized(&c->message_timer)) evtimer_del(&c->message_timer); evtimer_set(&c->message_timer, status_message_callback, c); + evtimer_add(&c->message_timer, &tv); } |