On Wed, Dec 13, 2023 at 11:09:41PM +0100, наб wrote: > On Wed, Dec 13, 2023 at 03:49:48PM +0100, наб wrote: > > On Wed, Dec 13, 2023 at 02:09:35PM +0100, наб wrote: > > > On Tue, Dec 12, 2023 at 08:30:02PM -0500, Thomas Dickey wrote: > > > > mouseinterval(0) tells it to not wait for mouse events, > > > Well, mouseinterval(3curses) says > > > Use mouseinterval(0) to disable click resolution. > > > which is different from "not wait for mouse events". > > Even funnier, it also says that > > The mouseinterval function sets the maximum time (in thousands of > > a second) that can elapse between press and release events for them to > > be recognized as a click. > > and it appears to only actually be used for coalescing adjacent click > > events into double and triple clicks (testing confirms this), > > so the manual sure reads like disinformation. > Okay so it does appear to be true... on NetBSD. > > > In light of this, > > > > I'd have used a 5msec delay (or 1msec for "modern" computers :-) > > I wouldn't, since this corresponds to the actual delay between > > consecutive clicks, and even I can't click twice in 5ms. > And in a quite-slow VM, under X and uxterm, > mouseinterval(0) works sporadically but mouseinterval(5) works always. > > Admittedly, curses_mouse(3) simultaneously says > "There is currently no actual mouse support" and > "The mouse functions were added in NetBSD 10.0"; > the default is 200ms.
I've noticed that they added stubs (mainly to allow some programs to link), but probably won't take a close look until NetBSD 10.0 is actually released. They haven't documented it here, for instance: https://www.netbsd.org/changes/changes-10.0.html ...and since I'm commenting on it, a quick look at the source code shows me just a stub (like all of the other functions in that file): int mouseinterval(__unused int erval) { return DEFAULT_MAXCLICK; } from this commit: commit bb2ce1fb3dcd76a4268234f209e31a4af8ac8135 Author: roy <r...@netbsd.org> Date: Mon Mar 23 13:37:36 2020 +0000 curses: Add stubs for mouse functions No mouse support actually included. But that doesn't matter because most terms don't actually support a mouse. We should look into hooking these into wsmouse(4) and xterm mouse in the future. Compatable with nCurses mouse API version 2. So I'd hold off on discussing what NetBSD curses does, until they get around to actually doing it. > (Additionally it also governs coalescing multiple clicks into > double/triple, just like under ncurses.) > > So the ncurses manual documents the behaviour of non-n-curses, > it's contradicted by experimentation on ncurses, > and the most common response to this > (I recommend a codesearch.d.n for "mouseinterval\(0" vs > "mouseinterval\([1-9]") > works on ncurses but breaks on non-n-curses? it's in the manpage: PORTABILITY These calls were designed for ncurses(3NCURSES), and are not found in SVr4 curses, 4.4BSD curses, or any other previous version of curses. > Why do I have to learn of this by gruesome experimentation > (the ISO was 743.78M 33.8KB/s in 5h 39m) > and an off-hand comment instead of this being in the manual? This particular function is little used, but generally speaking, having an idea of how click-resolution _has_ to be computed (like function-key stuff), it's not effective to use zero-delays. Currently it's used in one test program, and I see that it's using zero there (I didn't write that one, but have made several corrections to it - overlooked this detail). -- Thomas E. Dickey <dic...@invisible-island.net> https://invisible-island.net
signature.asc
Description: PGP signature