Closed mingodad closed 3 years ago
¡Hola Domingo! Gracias por comentar.
Could it be that the version of Ncurses provided by Lubuntu 18.04 is too old?
In source/platform/ncursinp.cpp
you can find the following code surrounded by #if
:
#if NCURSES_MOUSE_VERSION > 1
// Mouse wheel support was added in Ncurses v6. Before that, only
// scroll up would work. It's better not to support wheel scrolling
// in that case.
if (mevent.bstate & BUTTON4_PRESSED)
mouseWheel = mwUp;
else if (mevent.bstate & BUTTON5_PRESSED)
mouseWheel = mwDown;
#endif
Try to remove the #if
and #endif
and then compile again. If you get a compilation error, that means Ncurses is indeed too old.
Unfortunately, upgrading packages in LTS distributions can become a painful process. I don't use Ubuntu regularly, so I can't provide you with specific instructions on how to upgrade Ncurses.
¡Saludos!
@asanoic, for the mouse to work from a tty console, you have to start the GPM service. I do it like this:
systemctl start gpm.service
And to have it started automatically on every session:
systemctl enable gpm.service
Hello magiblot ! Thank you for reply ! Indeed when switching to full tty (Ctr-Alt-F1) and enabling gpm.service the mouse wheel works, but inside an xterminal it doesn't.
Yes, mouse support on the tty is independent from Ncurses. What I said about Ncurses only applies to terminal emulators, which is your use case.
I'm looking at https://github.com/orbitalquark/textadept and it uses http://www.leonerd.org.uk/code/libtermkey/ and it has mouse wheel working in xterm.
Yes. Lack of (complete) mouse wheel is a limitation of Ncurses v5 because of ABI compatibility. Applications which do not rely on Ncurses (such as the one you mention) do not suffer from this limitation.
Hi Domingo. The only way to work around this issue without a system upgrade is to implement an interface for a library other than Ncurses, and I'm not very interested in doing this.
I don't like to tell users to change their working environment, but this is all I can do for now. According to https://bugs.launchpad.net/ubuntu/+source/htop/+bug/1730143/comments/4, the Ncurses ABI was upgraded to v6 in Ubuntu 18.10 (Cosmic Cuttlefish). Maybe you can afford to upgrade your system to that version (or preferably a newer one).
Saludos.
Hello ! Compiling on my machine with lubuntu 18.04 the mouse click works but not the mouse wheel, see the cmake output bellow:
And here is tvedit link parameters:
Cheers !