[Top][All Lists]

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

Re: Mouse button handling

From: Damien Guibouret
Subject: Re: Mouse button handling
Date: Sun, 04 Sep 2011 18:59:24 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050416

Thomas Dickey wrote:
On Sat, Sep 03, 2011 at 06:13:20PM -0400, Thomas Dickey wrote:

On Mon, Aug 29, 2011 at 05:29:37PM -0400, Thomas Dickey wrote:

On Mon, 29 Aug 2011, Damien Guibouret wrote:


Loading the ncurses 5.9 version last week to try it in replacement to the old
5.4 I am still using, I've found some differences into mouse management that
breaks the behaviour in some cases. I take a look at the sources and did some
changes that I think necessary. All the changes I did are into
ncurses/base/lib_mouse.c file (I used 5.9 released version as base) and are
into the attached file with the following explanations.

thanks (will review/etc)

I'm about halfway through investigating this, won't finish today...

(as a general rule, I isolate the change that broke it, and then
see how the patch relates to that - looks like something between 5.7/5.8).

The change was this one:

        + modify getmouse() to act as its documentation implied, returning on
          each call the preceding event until none are left.  When no more
          events remain, it will return ERR.

The reason for it was this:

   modify getmouse() so it peels off the latest event, and checks before
   returning data that it is indeed valid.  This is prompted by changenote
   for Alexander's "le" where he was trying to purge the mouse queue by looping
   on getmouse until it returned an ERR.  It never did that, but modifying it
   seems to work consistently

(I agree it's not correct - hence your bug report, but to fix it properly,
I have to take into account the reason for the previous change.  So I'm
studying it... ;-)


The change that breaks something in my case was the one to handle wheel up/down: as it tests for event code to be 64 instead of 96, I've got 'button 4 press' instead of 'mouse motion with button 1 pressed' (the terminal I use has the 1002 DECSET mode as explained into http://www.xfree86.org/current/ctlseqs.html). But with looking at that, I've seen the other problems that could explain the other sometimes strange behaviour (mouse press without release, ...). As I told in my previous mail I am doing a change to fully compact the list and test for event to be valid and I hope to be able to send it on wednesday.



reply via email to

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