From b5432d8968bda70fc20ebb5e136e367d174d1c4e Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 30 Aug 2019 19:28:25 +0200 Subject: patch 8.1.1948: mouse doesn't work in Linux console Problem: Mouse doesn't work in Linux console and causes 100% CPU. (James P. Harvey) Solution: Loop in WaitForCharOrMouse() when gpm_process_wanted is set. (closes #4828) --- src/os_unix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/os_unix.c') diff --git a/src/os_unix.c b/src/os_unix.c index d80fb1db0..437b37ab0 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -6007,10 +6007,11 @@ WaitForCharOrMouse(long msec, int *interrupted, int ignore_input) gpm_process_wanted = 0; avail = RealWaitForChar(read_cmd_fd, msec, &gpm_process_wanted, interrupted); + if (!avail && !gpm_process_wanted) # else avail = RealWaitForChar(read_cmd_fd, msec, NULL, interrupted); -# endif if (!avail) +# endif { if (!ignore_input && input_available()) return 1; -- cgit v1.2.1