[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Possible bug in “kmous” in xterm-256color description
From: |
Thomas Dickey |
Subject: |
Re: Possible bug in “kmous” in xterm-256color description |
Date: |
Mon, 2 Aug 2021 16:48:25 -0400 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Mon, Aug 02, 2021 at 10:37:19AM -0400, Bill Gray wrote:
> On 8/1/21 5:29 AM, Thomas Dickey wrote:
>
> > mouse-position reporting is rarely used, judging from comments
> > made by various people (it would be a performance issue on any remote
> > connection).
>
> With 'any-event' (xterm-1003) tracking, you get events if
> the mouse moves at all. With 'button-event' (xterm-1002)
> tracking, you only get them if the mouse moves to another
> character cell. 1003 does get you a blizzard of events
> from even a small mouse movement. Even if you're running
> locally, it can be hard to keep up. Events can be 'lost'.
> I have a program that enables any-event tracking, so that
> it can detect if the mouse is hovering over a control and
> supply hint text... but the unreliability of mouse control
> in that situation has been a problem.
>
> Is there a way to blend 1003 and 1002 to ask for "any mouse
> event, but only if we're in a new character cell"? I think
That's terminal-specific (nothing that ncurses can do anything about).
xterm only (is supposed to) send events when there's a change.
That dates back to August 1998, so arguably other developers have
had a chance to test the feature.
Other programs don't necessarily do that (in a quick check,
I see that PuTTY, KDE Konsole send multiple events in a cell).
> most programs really don't care about mouse moves that remain
> in the current character cell.
>
> Alternatively, perhaps mouse motion events could be capped
> at, say, 20 a second ("we just reported a mouse move at time
> t0; we've got another one at t0 + 0.02 seconds, but don't
> report another move until t0 + 0.05, as we may not be done
> moving yet").
>
> -- Bill
>
--
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net
ftp://ftp.invisible-island.net
signature.asc
Description: PGP signature