<AWT Dev> <Swing Dev>  JDK-8213071: [macos] The focus is disappear after pressing return to close the "That was a pretty good movie!" dialog.
Sergey.Bylokhov at oracle.com
Tue Nov 13 00:42:02 UTC 2018
Did you check this behavior was in jdk7/8 GA, or it is a regression?
On 11/11/2018 04:58, shashidhara.veerabhadraiah at oracle.com wrote:
> Hi All, Please review a fix for an accessibility vpat issue.
> Bug: https://bugs.openjdk.java.net/browse/JDK-8213071
> Webrev: http://cr.openjdk.java.net/~sveerabhadra/8213071/webrev.00/
> The behavior of the same actions to reproduce the problem, produced different results with VO and without VO. It have behaved right without the VO and with VO, the focus was lost.
> The issue is with window being the KEY and MAIN window per the Mac windowing system. There are platform notifications like the 'windowDidBecomeMain' and 'windowDidBecomeKey' are issued for the window that is about to get the focus and key strokes. So typically under normal conditions, the window which is about to get notified of becoming the focusable window would get the KEY and MAIN notifications in that order.
> But with VO, some how the KEY notification was not delivered to java window and it only receives the MAIN notification. In this scenario, though the isKeyWindow() is true for this window, KEY notification was not delivered and only the MAIN notification is delivered. We do transfer the focus under the KEY notification handler which was not getting executed since it received no KEY notification. Per me, isKeyWindow() and MAIN notification is sufficient to transfer the focus and become a main window but I have not disturbed the existing handlers for the notification and fixed only for the case which is causing this issue.
> Thanks and regards,
Best regards, Sergey.
More information about the awt-dev