id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	branch_state	votes
4144	mouse clicks don't work on ncurses-6.2, generate garbage to stdout	slyfox		"It's forward of downstream https://bugs.gentoo.org/753578 report.

When mc is built with ncurses-6.2 mouse keypresses in xterm don't work and generate garbage output. The following workaround seems to be enough to fix it locally:

{{{#!diff
--- a/lib/tty/key.c
+++ b/lib/tty/key.c
@@ -2124,8 +2124,7 @@ tty_get_event (struct Gpm_Event *event, gboolean redo_event, gboolean block)
         gboolean extended = c == MCKEY_EXTENDED_MOUSE;

 #ifdef KEY_MOUSE
-        extended = extended || (c == KEY_MOUSE && xmouse_seq == NULL
-                                && xmouse_extended_seq != NULL);
+        extended = extended || (c == KEY_MOUSE && xmouse_extended_seq != NULL);
 #endif /* KEY_MOUSE */

         xmouse_get_event (event, extended);
}}}

{{{
$ LANG=C ./src/mc --version
GNU Midnight Commander 4.8.25-59-ga2bccac62
Built with GLib 2.64.5
Built with ncursesw 6.2
With builtin Editor
With subshell support as default
With support for background operations
With mouse support on xterm
With support for X11 events
With internationalization support
With multiple codepages support
With ext2fs attributes support
Virtual File Systems:
 cpiofs, tarfs, sfs, extfs, ftpfs, sftpfs, fish
Data types:
 char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;
}}}

Some details:

{{{
$ tput kmous | cat -v
^[[M
$ echo $TERM
xterm-256color
}}}

Actual generated sequences by xterm are in form of ""\e[<0;10;28M"", but mc expects-non-extended form of ""\e[bxy""."	defect	new	major	Future Releases	mc-core	4.8.25						no branch	
