summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2014-11-01 23:00:30 +0100
committerSébastien Helleu <flashcode@flashtux.org>2014-11-01 23:00:30 +0100
commita2c742026257894964c1a9ef10843920df0375a9 (patch)
treebf49805921821253a9664811afd48de161dd31d2 /src
parenta834c438c6f7b4a3481d9272b574948958f3b544 (diff)
downloadweechat-a2c742026257894964c1a9ef10843920df0375a9.zip
core: send mouse code only one time after delay with command /mouse enable|disable|toggle <delay>
Diffstat (limited to 'src')
-rw-r--r--src/core/wee-command.c13
1 files 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;
}