<AWT Dev> [9] Review request for 8166591 [macos 10.12] Trackpad scrolling of text on OS X 10.12 Sierra is very fast (Trackpad, Retina only)

Alexander Scherbatiy alexandr.scherbatiy at oracle.com
Fri Sep 30 11:25:23 UTC 2016


Hello,

Could you review the updated fix:
   http://cr.openjdk.java.net/~alexsch/8166591/webrev.05

The momentumPhase is used to detect the trackpad events.

Thanks,
Alexandr.

On 30/09/16 14:58, Sergey Malenkov wrote:
>> # C  [AppKit+0x3a528e]  -[NSApplication _crashOnException:]+0x6d
>>
>> The app is crashed as soon as I start scrolling. Investigating...
>> May be it is my fault during backporting.
> Sorry, It was may fault.
>
>
>> LWCToolkit.m:
>> +// SCROLL EVENT MASK
>> +#define SCROLL_PHASE_UNSUPPORTED 1
>> ...
>>
>> replace the comment with the following one:
>>
>> +// TRACKPAD SCROLL EVENT PHASE
> I discovered how we should detect mouse event properly: use both
> properties phase and momentumPhase.
> https://developer.apple.com/library/prerelease/content/documentation/Cocoa/Conceptual/EventOverview/HandlingTouchEvents/HandlingTouchEvents.html
> "The momentumPhase property helps you detect momentum scrolling, in
> which the hardware continues to issue scroll wheel events even though
> the user is no longer physically scrolling."
>
> if (phase==NULL) && (momentumPhase==NULL) -> this is a mouse event.
>
> scrolling by trackpad generates the following events:
>
> phase=mayBegan momentumPhase=null
> phase=began momentumPhase=null
> phase=continued momentumPhase=null
> ...
> phase=continued momentumPhase=null
> phase=ended momentumPhase=null
> phase=null momentumPhase=began
> phase=null momentumPhase=continued
> ...
> phase=null momentumPhase=continued
> phase=null momentumPhase=ended
>
> So, we should generate PHASE_UNSUPPORTED only
> if ((phase == NULL) && (momentumPhase == NULL))
>
>
>
>
>
>
>
>
>
>
>
>



More information about the awt-dev mailing list