From 090bd68e7cda97a605d16312eb99918a4fea9061 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Fri, 19 Feb 2010 10:23:34 +0100 Subject: Fix "inactivity" value when no key has been pressed since WeeChat started (bug #28930) --- ChangeLog | 4 +++- src/gui/gui-keyboard.c | 16 ++-------------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index b47302722..45ff89629 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ WeeChat ChangeLog ================= FlashCode -v0.3.2-dev, 2010-02-18 +v0.3.2-dev, 2010-02-19 Version 0.3.2 (under dev!) @@ -26,6 +26,8 @@ Version 0.3.2 (under dev!) and in buffer infolist * api: add description of arguments for functions hook_info and hook_infolist * api: fix function "color" in Lua script API +* api: fix "inactivity" value when no key has been pressed since WeeChat started + (bug #28930) * irc: add SASL authentication, with PLAIN and DH-BLOWFISH mechanisms (task #8829) * irc: fix crash with SSL connection if option ssl_cert is set (bug #28752) diff --git a/src/gui/gui-keyboard.c b/src/gui/gui-keyboard.c index 2f726de64..1bc5c245e 100644 --- a/src/gui/gui-keyboard.c +++ b/src/gui/gui-keyboard.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "../core/weechat.h" #include "../core/wee-hook.h" @@ -76,20 +77,7 @@ gui_keyboard_init () gui_key_combo_buffer[0] = '\0'; gui_key_grab = 0; gui_key_grab_count = 0; -} - -/* - * gui_keyboard_init_last_activity_time: init last activity time with current - * time - */ - -void -gui_keyboard_init_last_activity_time () -{ - struct timeval tv_time; - - gettimeofday (&tv_time, NULL); - gui_keyboard_last_activity_time = tv_time.tv_sec; + gui_keyboard_last_activity_time = time (NULL); } /* -- cgit v1.2.3