bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mouse button release behavior


From: Marc Vaillant
Subject: Re: mouse button release behavior
Date: Wed, 26 Dec 2007 18:07:29 -0500
User-agent: Mutt/1.5.17 (2007-11-01)

On Tue, Dec 25, 2007 at 07:01:35PM -0500, Thomas Dickey wrote:
> On Tue, 25 Dec 2007, Marc Vaillant wrote:
>
>> On Tue, Dec 25, 2007 at 04:45:53PM -0500, Thomas Dickey wrote:
>>> On Tue, 25 Dec 2007, vaillant wrote:
>>>
>>>>
>>>> Hello,
>>>>
>>>> I'm writing an application with ncurses that uses button1 and button3
>>>> simultaneously.  It appears that when holding down both buttons and then
>>>> releasing either button, ncurses always registers that the released button
>>>> is the last one pressed.  E.g. for the following 2 sequences, ncurses 
>>>> always
>>>> registers that the final release is button3:
>>>>
>>>> press and hold button1--press and hold button3--release button1
>>>> press and hold button1--press and hold button3--release button3
>>>>
>>>> Is this expected behavior?  I'm using ncurses 5.6 with OS X.
>>>
>>> xterm's mouse protocol doesn't allow for more - it tells which button
>>> is pressed, but not which one was released.
>>
>> But it queues an event when a button is released?  For both sequences
>> above I get BUTTON1_PRESSED -> BUTTON3_PRESSED -> BUTTON3_RELEASED.
>
> X does - but the terminal emulator translates it into characters.
>
>> Is there anything I can do to get proper behavior?  Can I use a
>> different terminal?
>
> probably not - existing terminals in X implement one or more of the
> mouse protocols in xterm, and they all have that limitation.

Ok, thank you.  If it's basically never possible to get X's proper
button release events, why does ncurses have BUTTON1_RELEASED,
BUTTON2_RELEASED, BUTTON3_RELEASED events?

Thanks,
Marc 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]