[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mouse handling doesn't looks correct
From: |
Thomas Dickey |
Subject: |
Re: mouse handling doesn't looks correct |
Date: |
Tue, 26 Jan 2021 18:23:11 -0500 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Mon, Jan 25, 2021 at 06:42:36PM +0100, Pavel Stehule wrote:
> Hi
>
> I try to implement drag support for my ncurses application. I found an
> example
>
> https://gist.github.com/sylt/93d3f7b77e7f3a881603#file-ncurses_mouse_movement-c
>
> It worked almost well, with two exceptions.
Just reading the source code, I see an error: the printf's are not fflush'd.
As a result, the control sequence may be corrupted and ignored.
I have an equivalent test in ncurses (test/ncurses.c, menu A or a).
That works fairly reliable (with xterm of course).
Wheel mice are a special problem, if you attempt to push button 2
(the wheel itself), that's likely to produce other buttons (6 or 7).
But I recall improving that a while back (and in my quick check,
it seems okay: just reporting position).
> When I use the mouse wheel, the mouse is in some strange state, and when I
> try to move with the mouse, then it generates events like the left button
> is pressed, but no button is pressed. After left click the behaviour is
> returned to normal.
>
> Second issue, that I can see, are a few false events. Although I did only
> mouse move, it generates the same mouse event like mouse click.
>
> Name : ncurses
> Version : 6.2
> Release : 3.20200222.fc33
> Architecture : x86_64
> Size : 608 k
> Source : ncurses-6.2-3.20200222.fc33.src.rpm
> Repository : @System
> >From repo : anaconda
> Summary : Ncurses support utilities
> URL : https://invisible-island.net/ncurses/ncurses.html
> License : MIT
>
> Is there some way to implement drag correctly?
>
> Regards
>
> Pavel Stehule
--
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net
ftp://ftp.invisible-island.net
signature.asc
Description: PGP signature
- mouse handling doesn't looks correct, Pavel Stehule, 2021/01/25
- Re: mouse handling doesn't looks correct,
Thomas Dickey <=
- Re: mouse handling doesn't looks correct, Pavel Stehule, 2021/01/27
- Re: mouse handling doesn't looks correct, Pavel Stehule, 2021/01/27
- Re: mouse handling doesn't looks correct, Pavel Stehule, 2021/01/27
- Re: mouse handling doesn't looks correct, Paul Fertser, 2021/01/27
- Re: mouse handling doesn't looks correct, Pavel Stehule, 2021/01/27
- Re: mouse handling doesn't looks correct, Pavel Stehule, 2021/01/27
- Re: mouse handling doesn't looks correct, Pavel Stehule, 2021/01/27
- Re: mouse handling doesn't looks correct, Thomas Dickey, 2021/01/27
- Re: mouse handling doesn't looks correct, Pavel Stehule, 2021/01/28