bug-ncurses
[Top][All Lists]
Advanced

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

Re: mouse button release behavior


From: Thomas Dickey
Subject: Re: mouse button release behavior
Date: Tue, 25 Dec 2007 19:01:35 -0500 (EST)

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.

To see the flavors, look at vttest (which should build/run in OS X):


         Menu 11.7.2: XTERM mouse features

         Choose test type:

          0. Exit
          1. X10 Mouse Compatibility
          2. Normal Mouse Tracking
          3. Mouse Highlight Tracking
          4. Mouse Any-Event Tracking (XFree86 xterm)
          5. Mouse Button-Event Tracking (XFree86 xterm)
          6. DEC Locator Events (DECterm)


--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net




reply via email to

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