=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/status.c,v retrieving revision 1.41 retrieving revision 1.42 diff -c -r1.41 -r1.42 *** src/usr.bin/tmux/status.c 2009/11/04 21:04:43 1.41 --- src/usr.bin/tmux/status.c 2009/11/04 23:29:42 1.42 *************** *** 1,4 **** ! /* $OpenBSD: status.c,v 1.41 2009/11/04 21:04:43 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: status.c,v 1.42 2009/11/04 23:29:42 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 33,38 **** --- 33,39 ---- void status_job_callback(struct job *); size_t status_width(struct winlink *); char *status_print(struct session *, struct winlink *, struct grid_cell *); + void status_message_callback(int, short, void *); void status_prompt_add_history(struct client *); char *status_prompt_complete(const char *); *************** *** 579,589 **** delay = options_get_number(&c->session->options, "display-time"); tv.tv_sec = delay / 1000; tv.tv_usec = (delay % 1000) * 1000L; - if (gettimeofday(&c->message_timer, NULL) != 0) - fatal("gettimeofday failed"); - timeradd(&c->message_timer, &tv, &c->message_timer); - c->tty.flags |= (TTY_NOCURSOR|TTY_FREEZE); c->flags |= CLIENT_STATUS; } --- 580,590 ---- delay = options_get_number(&c->session->options, "display-time"); tv.tv_sec = delay / 1000; tv.tv_usec = (delay % 1000) * 1000L; + + evtimer_del(&c->message_timer); + evtimer_set(&c->message_timer, status_message_callback, c); + evtimer_add(&c->message_timer, &tv); c->tty.flags |= (TTY_NOCURSOR|TTY_FREEZE); c->flags |= CLIENT_STATUS; } *************** *** 601,606 **** --- 602,615 ---- c->flags |= CLIENT_REDRAW; /* screen was frozen and may have changed */ screen_reinit(&c->status); + } + + void + status_message_callback(unused int fd, unused short event, void *data) + { + struct client *c = data; + + status_message_clear(c); } /* Draw client message on status line of present else on last line. */