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

Phil Race philip.race at oracle.com
Tue Oct 30 18:00:23 UTC 2018


Minor nit, there's a wild card import in the test :-

   24 import java.awt.*;


On 10/11/18 11:52 AM, 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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20181030/f2c69d0f/attachment-0001.html>

More information about the awt-dev mailing list