From: Vojtech Pavlik <vojtech@suse.cz>
To: Dmitry Torokhov <dtor_core@ameritech.net>
Cc: Vojtech Pavlik <vojtech@suse.cz>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.6] input: do not suppress 0 value relative events
Date: Sat, 4 Oct 2003 10:01:37 +0200 [thread overview]
Message-ID: <20031004080137.GA3816@ucw.cz> (raw)
In-Reply-To: <200310040248.27501.dtor_core@ameritech.net>
On Sat, Oct 04, 2003 at 02:48:27AM -0500, Dmitry Torokhov wrote:
> On Saturday 04 October 2003 02:36 am, Vojtech Pavlik wrote:
> > On Sat, Oct 04, 2003 at 02:22:57AM -0500, Dmitry Torokhov wrote:
> > > Input: input susbsystem should not drop 0 value relative events,
> > > otherwise unsuspecting programs will loose transitions from
> > > non-zero to 0 deltas. We should not require userland authors
> > > to consult with kernel implementation details all the time,
> > > but follow the principle of least surprise and report
> > > everything.
> >
> > Certain devices will then generate an endless stream of zero-movement
> > relative events, which is not good.
> >
> > Because 'relative' means that there is no movement when there is no
> > event, where exactly lies the problem? What application has a problem
> > with this? Many mice don't ever report zero values, so that application
> > will probably not work even without the (value==0) check ...
>
> But the problem is not only repetitive zeros are not reported but also that
> transition from non-zero to zero delta is not reported either.
>
> OK, since you telling me there are devices which never stop generating
> events we could go the way absolute events done and suppress repeated data.
> Should I try that?
>
> As far as application goes it was my modified version of GPM - pretty much
> every other event is not repeated unless changed so I did not reset the
> internal state and expected get an event telling me the last delta. I am
> OK with data not being repeated but I want to get event for transition
> to 0.
That works for ABSOLUTE events. They're not repeated, and you always
get the value when it changes.
RELATIVE events are very different - if you don't get an event, there
is no movement. If you get one, even repeated, that means there was some
movement and you must process every single (even repeated) event, since
that's what gives the total movement.
Not "repeating" relative data doesn't work, since there is nothing like
"current" value of a relative valuator - if there is any, then it's the
sum of all previous events. Try thinking of relative as of an first
derivative of absolute - and see why you can never get a zero relative
event.
You're trying to treat relative as absolute - why?
--
Vojtech Pavlik
SuSE Labs, SuSE CR
next prev parent reply other threads:[~2003-10-04 8:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-04 7:22 [PATCH 2.6] input: do not suppress 0 value relative events Dmitry Torokhov
2003-10-04 7:36 ` Vojtech Pavlik
2003-10-04 7:48 ` Dmitry Torokhov
2003-10-04 8:01 ` Vojtech Pavlik [this message]
2003-10-05 19:13 ` Zach Welch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20031004080137.GA3816@ucw.cz \
--to=vojtech@suse.cz \
--cc=dtor_core@ameritech.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox