Re: [PATCHv3 1/2] Initial TUI mouse support

Pedro Alves
2021-06-04T20:54:39Z

On 2021-06-04 7:46 p.m., Tom Tromey wrote:
> Pedro> The trouble is that now pressing anywhere on the screen with the
> Pedro> mouse just results in weird characters being printed on the
> Pedro> command line window (probably uninterpreted control sequences).
>
> I tried it here, and it worked fine for me.
>
> I couldn't select text, but I didn't see any control characters.
>
> Pedro> This was on Ubuntu 20.04.
>
> I'm on Fedora 32.

I'm currently on Fedora 32 too, and while it works here too, I just found a way to reproduce a similar
problem that I'm seeing on the Ubuntu machine (which I currently don't have access to). (Though
on Ubuntu it was worse.)

Try this:

$ ./gdb ./gdb
...
(gdb) start
c-x a
scroll up and down with mouse to check that it works ok.
c-x o # select command window
scroll up and down with mouse, and see escape codes being printed on the command window

If I "c-x o" again to select the source window, then scrolling works correctly again.

If I "c-x o" again to select the command window, then scrolling and clicking with the mouse
prints more bad characters. Like these:

(top-gdb) 64;40;21M64;40;21M65;40;21M65;40;21M64;40;21M64;40;21M64;40;21M65;40;21M0;67;32M0;67;32m0;64;18M0;64;18m0;64;18M0;64;18m2;64;18M2;64;18m0;64;18M0;64;18M0;64;18M0
;64;18m1;64;18M1;64;18m64;64;18M64;64;18M1;64;19M1;64;19m1;64;19M1;64;19m2;64;19M2;64;19m0;64;19M0;64;19m0;51;13M0;51;13m0;1;27M0;1;27M0;1;27M0;1;27M0;1;27M0;1;27M0;1;27M0
;1;27M0;1;27M0;1;27m

Pedro Alves

>
> I wonder if there's something weird about the Ubuntu build of ncurses.
> Or the Fedora one.
>
> Tom
>