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

2016-10-05 Thread Sergey Bylokhov
On 30.09.16 20:36, Sergey Malenkov wrote: The updated version where the brgining threshold is set to 0.5: http://cr.openjdk.java.net/~alexsch/8166591/webrev.09 Thank you. Looks good. +1 Could you please look at the attached patch for 8u? I used it with our custom jdk to test the behav

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

2016-10-04 Thread Sergey Malenkov
I've got old MacBook Air 2011, 11" non-Retina display. I installed Sierra and reproduced the fast scrolling issue. Now I have no idea when it can be reproduced and when cannot. Then I installed 10.12.1 beta (16B2333a). Seems that the issue is not reproducible with a system terminal anymore, but

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

2016-10-04 Thread Sergey Malenkov
Hi all, Message from Mike Swingler about sensitive scrolling: >The original issue your bug was duplicated against > has been resolved by the HID engineering team, > and should be available in a forthcoming beta of > macOS 10.12.1. To get it via Software Update, > sign up at

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

2016-09-30 Thread Sergey Malenkov
Also, I can't understand what DELTA_THRESHOLD means? It increases a pause before scrolling, which is not comfortable for me. >>> >>> Yes. I is just a barrier before which the wheel rotation event is not >>> counted. >> >> The default 0.5 from Math.round is more comfortable. >> >> Could yo

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

2016-09-30 Thread Alexander Scherbatiy
On 30/09/16 19:48, Alexander Scherbatiy wrote: On 30/09/16 19:33, Sergey Malenkov wrote: I'm not sure. It can be a "false" scrolling when you accidentally touched a Magic Mouse. I think we should use threshold on the phase end, to ignore accumulatedDelta less than 0.1 Could you review the upda

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

2016-09-30 Thread Sergey Malenkov
>> I'm not sure. It can be a "false" scrolling when you accidentally >> touched a Magic Mouse. > > The same "false" can occur at the "end" stage, also? Yes, but at the "end" we can use a threshold. See below: >> I think we should use threshold on the phase end, to ignore >> accumulatedDelta less

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

2016-09-30 Thread Alexander Scherbatiy
On 30/09/16 19:43, Sergey Malenkov wrote: + (jint) scrollStateWithEvent: (NSEvent*) event { scrollPhaseFromEvent sounds more clear for me if ([event type] != NSScrollWheel) { return 0; } We have no corresponding SCROLL_PHASE_ constant. This value is not processed and is proc

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

2016-09-30 Thread Sergey Bylokhov
On 30.09.16 18:33, Sergey Malenkov wrote: I'm not sure. It can be a "false" scrolling when you accidentally touched a Magic Mouse. The same "false" can occur at the "end" stage, also? I think we should use threshold on the phase end, to ignore accumulatedDelta less than 0.1 On Fri, Sep 30,

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

2016-09-30 Thread Alexander Scherbatiy
On 30/09/16 19:33, Sergey Malenkov wrote: I'm not sure. It can be a "false" scrolling when you accidentally touched a Magic Mouse. I think we should use threshold on the phase end, to ignore accumulatedDelta less than 0.1 Could you review the updated fix: http://cr.openjdk.java.net/~alexsch/8

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

2016-09-30 Thread Sergey Malenkov
final int roundDelta = isShift && roundDeltaY != 0.0 ? roundDeltaY : roundDeltaX; roundDeltaY is integer and should be compared with 0 On Fri, Sep 30, 2016 at 6:43 PM, Sergey Malenkov wrote: > + (jint) scrollStateWithEvent: (NSEvent*) event { > > scrollPhaseFromEvent sounds more clear for me > >

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

2016-09-30 Thread Sergey Malenkov
+ (jint) scrollStateWithEvent: (NSEvent*) event { scrollPhaseFromEvent sounds more clear for me if ([event type] != NSScrollWheel) { return 0; } We have no corresponding SCROLL_PHASE_ constant. This value is not processed and is processed like S_P_CONTINUED in our code. On F

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

2016-09-30 Thread Sergey Malenkov
I'm not sure. It can be a "false" scrolling when you accidentally touched a Magic Mouse. I think we should use threshold on the phase end, to ignore accumulatedDelta less than 0.1 On Fri, Sep 30, 2016 at 6:18 PM, Sergey Bylokhov wrote: > What will be the difference if we will scroll by one line

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

2016-09-30 Thread Sergey Bylokhov
What will be the difference if we will scroll by one line at the "begin phase"? probably it will be better if the the scroll will start immediately on first touch? On 30.09.16 17:59, Alexander Scherbatiy wrote: Hello, Could you review the updated fix: http://cr.openjdk.java.net/~alexsch/81

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

2016-09-30 Thread Alexander Scherbatiy
Hello, Could you review the updated fix: http://cr.openjdk.java.net/~alexsch/8166591/webrev.06 - The CPlatformResponder.handleScrollEvent(...) is updated to dispatch a scroll event when delta or round delta is not equal to zero - The native scrollStateWithPhase: method is updated to have NS

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

2016-09-30 Thread Sergey Malenkov
In the CPlatformResponder: phase3 0 ~ 0.0 // mayBegan phase2 0 ~ 0.0 // began phase3 0 ~ 0.0222015380859375 phase3 0 ~ 0.0234222412109375 phase3 0 ~ 0.023956298828125 phase3 0 ~ 0.0242919921875 phase3 0 ~ 0.02447509765625 phase3 0 ~ 0.0246124267578125 phase3 0 ~ 0.024658203125 phase3 0 ~ 0.0222015

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

2016-09-30 Thread Alexander Scherbatiy
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 c

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

2016-09-30 Thread Sergey Malenkov
> # 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 > ... > > re

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

2016-09-30 Thread Alexandr Scherbatiy
On 9/30/2016 1:31 PM, 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 my fault. Now it works. Consider how it works for one short

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

2016-09-30 Thread Sergey Malenkov
> # 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 my fault. Now it works. Consider how it works for one short gesture: phase3 0 ~ 0.0 // unexpected PHA

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

2016-09-30 Thread Sergey Malenkov
# 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. LWCToolkit.m: +// SCROLL EVENT MASK +#define SCROLL_PHASE_UNSUPPORTED 1 ... replace the comment with the following one:

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

2016-09-29 Thread Alexander Scherbatiy
Hello, Could you review the updated fix: http://cr.openjdk.java.net/~alexsch/8166591/webrev.04 The fix uses the proposed changes below and sets a wheel rotation to +1 or -1 when the scroll phase is ended and the accumulates delta value is small than the threshold. Thanks, Alexandr. On 29

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

2016-09-29 Thread Sergey Malenkov
>> But we already did some magic to support mouse event. >> On the top level I have no access to the phase values. > > But how this values helps you? If we roundup the accumulator on the "end > phase" the scroll will be slow in the middle phase, no? I want to support short gestures like we support

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

2016-09-29 Thread Sergey Bylokhov
value should be accumulated) And this is responsibility of upper level to do some work depending from the MouseWheelEvent. But we already did some magic to support mouse event. On the top level I have no access to the phase values. But how this values helps you? If we roundup the accumulator o

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

2016-09-29 Thread Sergey Malenkov
> It depends from the application, just checked on the list of emails in the > Thunderbird which have small "deadzone". I think we should not do any magic > in this files. only get native event and post it to upper level(the int > value should be accumulated) And this is responsibility of upper lev

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

2016-09-29 Thread Sergey Bylokhov
On 29.09.16 22:08, Sergey Malenkov wrote: Just to clarify, if you perform slow scroll gesture and the accumulator will be less than threshold means that you should not scroll, no? Because the sum of overall scroll events are less than one line. The fact that you need to "move a certain minimum di

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

2016-09-29 Thread Sergey Malenkov
>> Look at the following scenario: >> - Perform slow and short scroll gesture >> - Accumulator is less than threshold >> - All wheel events during this gesture has wheelRotation=0 >> - Nothing is scrolled actually. >> - Repeat several such gestures - nothing is scrolled > > Just to clarify, if you

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

2016-09-29 Thread Sergey Malenkov
> - The SCROLL_MASK_PHASE_CANCELLED and SCROLL_MASK_PHASE_ENDED scroll masks > are added. Now we use the scrollMask value and the following constants: static final int SCROLL_MASK_WHEEL = 1; static final int SCROLL_MASK_TRACKPAD = 1 << 1; static final int SCROLL_MASK_PHASE_BEGAN = 1 << 2; static

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

2016-09-29 Thread Sergey Bylokhov
On 29.09.16 21:30, Sergey Malenkov wrote: - The SCROLL_MASK_PHASE_CANCELLED and SCROLL_MASK_PHASE_ENDED scroll masks are added. Could you please use these masks in your fix? Look at the following scenario: - Perform slow and short scroll gesture - Accumulator is less than threshold - All wheel

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

2016-09-29 Thread Sergey Malenkov
> - The SCROLL_MASK_PHASE_CANCELLED and SCROLL_MASK_PHASE_ENDED scroll masks > are added. Could you please use these masks in your fix? Look at the following scenario: - Perform slow and short scroll gesture - Accumulator is less than threshold - All wheel events during this gesture has wheelRota

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

2016-09-29 Thread Sergey Malenkov
> Could you please read comments about "deazone" in the following issue: > https://youtrack.jetbrains.com/issue/IDEA-158500 > Is DELTA_THRESHOLD introduced to solve such a deadzone? If your scroll gesture on a trackpad is very slow, a list will be scrolled by a single line after unexpected delay:

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

2016-09-29 Thread Sergey Malenkov
It is OK for me. Thanks! The fix is tested. The patch for 8u is attached. It slightly differs because of changed codebase. Could you please read comments about "deazone" in the following issue: https://youtrack.jetbrains.com/issue/IDEA-158500 Is DELTA_THRESHOLD introduced to solve such a deadzone?

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

2016-09-29 Thread Alexander Scherbatiy
Hello, Could you review the updated fix: http://cr.openjdk.java.net/~alexsch/8166591/webrev.03 - NSEvent constructor call is updated in the CTrayIcon.m - The SCROLL_MASK_PHASE_CANCELLED and SCROLL_MASK_PHASE_ENDED scroll masks are added. Thanks, Alexandr. On 29/09/16 17:29, Sergey Malenk

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

2016-09-29 Thread Sergey Malenkov
The signature of the NSEvent constructor is changed. It is called from AWTView.m (fixed) and CTrayIcon.m (!not fixed!) Could you please support not only the phase start, but the phase end too? It will be useful, when we decide to support precise scrolling in JScrollPane, because we will be able to

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

2016-09-28 Thread Semyon Sadetsky
Looks good. --Semyon On 9/28/2016 8:16 PM, Alexander Scherbatiy wrote: Hello, Could you review the fix: bug: https://bugs.openjdk.java.net/browse/JDK-8166591 webrev: http://cr.openjdk.java.net/~alexsch/8166591/webrev.02 This issue has been risen and investigated by JetBrains team in t

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

2016-09-28 Thread Alexander Scherbatiy
Hello, Could you review the fix: bug: https://bugs.openjdk.java.net/browse/JDK-8166591 webrev: http://cr.openjdk.java.net/~alexsch/8166591/webrev.02 This issue has been risen and investigated by JetBrains team in the email: http://mail.openjdk.java.net/pipermail/awt-dev/2016-September/0