From a2c742026257894964c1a9ef10843920df0375a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 1 Nov 2014 23:00:30 +0100 Subject: core: send mouse code only one time after delay with command /mouse enable|disable|toggle --- src/core/wee-command.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/core/wee-command.c b/src/core/wee-command.c index 7f4f99f61..128477b6d 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -3899,16 +3899,9 @@ command_mouse_timer_cb (void *data, int remaining_calls) (void) data; (void) remaining_calls; - if (gui_mouse_enabled) - { - gui_mouse_disable (); - config_file_option_set (config_look_mouse, "0", 1); - } - else - { - gui_mouse_enable (); - config_file_option_set (config_look_mouse, "1", 1); - } + config_file_option_set (config_look_mouse, + (gui_mouse_enabled) ? "0" : "1", + 1); return WEECHAT_RC_OK; } -- cgit v1.2.3