<AWT Dev> [12] Review Request: 8207070 Webstart app popup on wrong screen in a one-screen setup changing to multi-monitor

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Tue Oct 30 00:56:43 UTC 2018

Any volunteers to review? =)

On 11/10/2018 11:52, Sergey Bylokhov wrote:
> Hello.
> Please review the fix for jdk 12.
> Bug: https://bugs.openjdk.java.net/browse/JDK-8207070
> Webrev: http://cr.openjdk.java.net/~serb/8207070/webrev.01
> Bug description:
> This is one more bug which was caused by the removing the main appcontext in case of applets/webstart application. Since then the toolkit thread has no appcontext, and we should not call any methods which use appcontext on the toolkit thread.
> In the updated code we have tried to call "EventQueue.invokeLater()". Note that in case of applets/webstart we have a few EDT, so we need to know which EDT(stored per appcontext) should be used, but since toolkit thread has no appconext we throw NPE.
> Fix description:
>   - WWindowPeer.java: the updateGC() always will be called on the EDT related to the peer's target component, regardless on what thread the WWindowPeer.displayChanged() was called.
>   - WWtoolkit.java: in case of applet/webstart we will run the GraphicsEnvironment.displayChanged() on the separate thread. Note that it is possible to use the toolkit thread for this, except for D3D which use the toolkit thread for rendering. It is possible to workaround it, but I do not want to push it to jdk8, I will get rid of this in the later release.

Best regards, Sergey.

More information about the awt-dev mailing list