From 19daa3940ff1a5efcad8306ad6ecda6d708dbd4e Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 4 Nov 2009 23:29:43 +0000 Subject: Use timeout events for the identify and message timers. --- usr.bin/tmux/server-client.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'usr.bin/tmux/server-client.c') diff --git a/usr.bin/tmux/server-client.c b/usr.bin/tmux/server-client.c index 87c723ad915..6db511bf4e7 100644 --- a/usr.bin/tmux/server-client.c +++ b/usr.bin/tmux/server-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server-client.c,v 1.14 2009/11/04 23:12:43 nicm Exp $ */ +/* $OpenBSD: server-client.c,v 1.15 2009/11/04 23:29:42 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -120,8 +120,11 @@ server_client_lost(struct client *c) if (c->title != NULL) xfree(c->title); + evtimer_del(&c->identify_timer); + if (c->message_string != NULL) xfree(c->message_string); + evtimer_del(&c->message_timer); if (c->prompt_string != NULL) xfree(c->prompt_string); @@ -448,12 +451,6 @@ server_client_check_timers(struct client *c) if (gettimeofday(&tv, NULL) != 0) fatal("gettimeofday failed"); - if (c->flags & CLIENT_IDENTIFY && timercmp(&tv, &c->identify_timer, >)) - server_clear_identify(c); - - if (c->message_string != NULL && timercmp(&tv, &c->message_timer, >)) - status_message_clear(c); - if (c->message_string != NULL || c->prompt_string != NULL) { /* * Don't need timed redraw for messages/prompts so bail now. -- cgit v1.2.3