diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2025-09-09 20:35:17 +0300 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2025-09-09 20:45:38 +0300 |
commit | a673fe139a7cc44a7f2b4839aaa78124c49c4b75 (patch) | |
tree | 465827b560bc265d555c58069caff1d9a1376757 /TODO | |
parent | 091695bad445c8931e9bd21e3a6ccfefac99657a (diff) | |
download | sciteco-a673fe139a7cc44a7f2b4839aaa78124c49c4b75.tar.gz |
work around ncurses mouse handling bugs
* We have to process several mouse events for every KEY_MOUSE.
* The order of events is sort of arbitrary after clicking the middle mouse button
in some terminal emulators like st and Xterm.
Therefore BUTTON2_PRESSED is now ignored and resynthesized when
receiving BUTTON2_RELEASED.
This fixes loosing middle click events.
fnkeys.tes only processes the RELEASED event anyway.
I am still looking for a fix to contribute to the ncurses project.
* In GNOME Terminal and Xterm with the SGR mouse protocol,
you can receive bogus BUTTON3_PRESSED events when left scrolling.
There is an upstream fix.
As a workaround -- we will have to live with outdated ncurses
versions anyway -- we prevent resetting the mouse mask unnecessarily.
This limits the effects to a single bogus BUTTON3_PRESSED event.
Unfortunately, it's not easily possible to force ncurses into using
the X10 mouse protocol even if the terminfo entry claims SGR compatibility.
See also https://lists.gnu.org/archive/html/bug-ncurses/2025-09/msg00016.html
Diffstat (limited to 'TODO')
-rw-r--r-- | TODO | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -7,6 +7,17 @@ Tasks: similar to double right click. Known Bugs: + * GNOME Terminal and Xterm produces BUTTON3_PRESSED (without BUTTON3_RELEASED) events + when scrolling horizontally. + This is a confirmed ncurses bug, which will be fixed + but we have to live with old ncurses versions as well. + We limit the effect of this bug by not resetting the mousemask() + unnecessarily. + * Curses: st and Xterm produce BUTTON2_RELEASED, followed by BUTTON2_PRESSED + when clicking the middle button. + We also *sometimes* get it in the correct order. + This is apparently an ncurses bug. + We work around this by synthesizing BUTTON2_PRESSED when receiving BUTTON2_RELEASED. * Upgrade to Scintilla 5.5.7 requires charconv header which bumps the minimum GCC version to 8.1 (officially 9). This breaks OpenSUSE 15.5-15.6 builds. |