On 11/9/2016 4:30 PM, Alexandr Scherbatiy wrote:

On 10/25/2016 4:24 PM, Semyon Sadetsky wrote:
Hello,

Please review fix for JDK9:

bug: https://bugs.openjdk.java.net/browse/JDK-8075084

webrev: http://cr.openjdk.java.net/~ssadetsky/8075084/webrev.00/

When a modal dialog is shown in scroll bar button click listener it blocks all events targeted to the scroll bar owner window.

At the same time clicking on scroll bar button triggers a timer which should adjust scroll bar value automatically until mouse button is released, i.e. until mouse release event comes to the pushed scroll button. So, this timer is not stopped by the mouse release event because it is rejected by the modal filter. When modal dialog is closed the timer continues to produce scroll adjustment events and the dialog is shown again. Also the scroll button remains pushed and hovered all the time (because it didn't get mouse release event).

In the suggested fix the timer is started only if the scroll bar owner window keeps input focus after the adjustment callback and the scroll button is reset otherwise.

Is it possible that a scroll bar lost the focus not because a new modal dialog opened by some other valid reason and the scroll timer should be started for this case?
It is not possible, because setting another window as focused in KFM is executed in the component event handler on EDT, which will only happen after returning from the mouse pressed handler or if the secondary event loop is started (a modal dialog is shown).

--Semyon

  Thanks,
  Alexandr.


--Semyon



Reply via email to