summaryrefslogtreecommitdiff
path: root/src/gui/curses/gui-curses-mouse.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2015-07-25 09:16:08 +0200
committerSébastien Helleu <flashcode@flashtux.org>2015-07-25 09:16:08 +0200
commit7572fec26150d4097ae448af9d265cd5ce39ccc3 (patch)
treec29391cdfc6c7c39e8d11fde282ea2205e2b85e5 /src/gui/curses/gui-curses-mouse.c
parentb99a6307051d00d9fcece0588d382e2fb62c193f (diff)
downloadweechat-7572fec26150d4097ae448af9d265cd5ce39ccc3.zip
core: flush stdout/stderr after sending text directly on them (fix corrupted data sent to hook_process() callback) (closes #442)
Diffstat (limited to 'src/gui/curses/gui-curses-mouse.c')
-rw-r--r--src/gui/curses/gui-curses-mouse.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/curses/gui-curses-mouse.c b/src/gui/curses/gui-curses-mouse.c
index a1a186bfc..16330a76e 100644
--- a/src/gui/curses/gui-curses-mouse.c
+++ b/src/gui/curses/gui-curses-mouse.c
@@ -89,6 +89,7 @@ gui_mouse_enable ()
{
gui_mouse_enabled = 1;
fprintf (stderr, "\033[?1005h\033[?1000h\033[?1002h");
+ fflush (stderr);
(void) hook_signal_send ("mouse_enabled",
WEECHAT_HOOK_SIGNAL_STRING, NULL);
@@ -103,6 +104,7 @@ gui_mouse_disable ()
{
gui_mouse_enabled = 0;
fprintf (stderr, "\033[?1002l\033[?1000l\033[?1005l");
+ fflush (stderr);
(void) hook_signal_send ("mouse_disabled",
WEECHAT_HOOK_SIGNAL_STRING, NULL);