<AWT Dev> Update to the proposal on enhancing MouseWheelEvent
pavel.fatin at jetbrains.com
Thu Jan 16 13:37:49 UTC 2020
As described in https://pavelfatin.com/scrolling-with-pleasure/#linux and
ideally, we need an API that distinguishes between "relative" and
"absolute" deltas. Otherwise, the scrolling would be smooth, but its speed
would depend on the line height, so that the speed might vary between
different applications, and scrolling might be non-linear (as explained in
Most modern APIs and toolkits do support pixel deltas, e.g.:
* Qt: https://doc.qt.io/qt-5/qwheelevent.html#pixelDelta
* DOM Level 3 (web browsers):
Even in the presence of a touchscreen-specific API, it still makes sense to
generate the normal scroll events (we can do that not just in Linux, but
also in Windows & macOS).
It seems that enhancing MouseWheelEvent is a good way to support "absolute"
deltas, which would be consistent with other similar APIs.
On Wed, Jan 15, 2020 at 1:00 PM Denis Konoplev <denis.konoplev at jetbrains.com>
> Hello Sergey,
> I can enable smooth scrolling on linux via xinput2.
> As I understand it, correct me if i am wrong, this change don't require
> change of public API, we can use precise delta?
> Looking forward to hearing from you,
> From: Alexey Ushakov <alexey.ushakov at jetbrains.com>
>> Date: Mon, Jan 13, 2020 at 12:19 PM
>> Subject: Re: <AWT Dev> Update to the proposal on enhancing MouseWheelEvent
>> To: Sergey Bylokhov <Sergey.Bylokhov at oracle.com>
>> Cc: Denis Konoplev <dekonoplyov at gmail.com>, Pavel Fatin <
>> pavel.fatin at jetbrains.com>, <awt-dev at openjdk.java.net>
>> Hello Sergey,
>> We’ve resumed our work on smooth scrolling. However, this time we started
>> from other end - we’ve implemented support of touch screen devices on Linux
>> and Windows. I think we can extend it on precise scrolling deltas for high
>> precision mouse devices. Currently we have only private API in our JBR but
>> we’re going to discuss it on OpenJDK alias a bit later. This work is driven
>> by Denis Konoplev. He’ll provide some more technical info soon.
>> Best Regards,
>> > On 12 Jan 2020, at 03:22, Sergey Bylokhov <Sergey.Bylokhov at oracle.com>
>> > Hi, Pavel.
>> > On 1/5/17 8:21 am, Pavel Fatin wrote:
>> >> Thus, 2 of the 3 major OSes already provide absolute scrolling deltas
>> – that's an additional argument in favor of the Java's MouseWheelEvent
>> > After some period of time can you please share how the solution above
>> has recommended itself.
>> >> Besides, it seems plausible that Linux will also embrace this trend
>> and include absolute scrolling deltas in XInput2 and (especially) libinput.
>> > Did something similar was implemented on Linux?
>> > --
>> > Best regards, Sergey.
> <denis.konoplev at jetbrains.com>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the awt-dev