=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/server-fn.c,v retrieving revision 1.27 retrieving revision 1.28 diff -c -r1.27 -r1.28 *** src/usr.bin/tmux/server-fn.c 2009/11/04 23:12:43 1.27 --- src/usr.bin/tmux/server-fn.c 2009/11/04 23:29:42 1.28 *************** *** 1,4 **** ! /* $OpenBSD: server-fn.c,v 1.27 2009/11/04 23:12:43 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: server-fn.c,v 1.28 2009/11/04 23:29:42 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 24,29 **** --- 24,31 ---- #include "tmux.h" + void server_callback_identify(int, short, void *); + void server_fill_environ(struct session *s, struct environ *env) { *************** *** 353,363 **** delay = options_get_number(&c->session->options, "display-panes-time"); tv.tv_sec = delay / 1000; tv.tv_usec = (delay % 1000) * 1000L; - if (gettimeofday(&c->identify_timer, NULL) != 0) - fatal("gettimeofday failed"); - timeradd(&c->identify_timer, &tv, &c->identify_timer); - c->flags |= CLIENT_IDENTIFY; c->tty.flags |= (TTY_FREEZE|TTY_NOCURSOR); server_redraw_client(c); --- 355,365 ---- delay = options_get_number(&c->session->options, "display-panes-time"); tv.tv_sec = delay / 1000; tv.tv_usec = (delay % 1000) * 1000L; + + evtimer_del(&c->identify_timer); + evtimer_set(&c->identify_timer, server_callback_identify, c); + evtimer_add(&c->identify_timer, &tv); c->flags |= CLIENT_IDENTIFY; c->tty.flags |= (TTY_FREEZE|TTY_NOCURSOR); server_redraw_client(c); *************** *** 371,376 **** --- 373,386 ---- c->tty.flags &= ~(TTY_FREEZE|TTY_NOCURSOR); server_redraw_client(c); } + } + + void + server_callback_identify(unused int fd, unused short events, void *data) + { + struct client *c = data; + + server_clear_identify(c); } void