<AWT Dev> [9] Review Request: 8160270 dual-screen issue with java.awt.Choice
Sergey Bylokhov
sergey.bylokhov at oracle.com
Fri Mar 17 05:19:12 UTC 2017
No issues in the awt tests, but I decide to update the fix in place.
http://cr.openjdk.java.net/~serb/8160270/webrev.00/src/java.desktop/unix/classes/sun/awt/X11/XBaseMenuWindow.java.sdiff.html <http://cr.openjdk.java.net/~serb/8160270/webrev.00/src/java.desktop/unix/classes/sun/awt/X11/XBaseMenuWindow.java.sdiff.html>
One line was added to check that we access the native peers only for HW components.
657 GraphicsConfiguration getCurrentGraphicsConfiguration() {
+658 Component hw = SunToolkit.getHeavyweightComponent(target);
659 XWindow peer = AWTAccessor.getComponentAccessor().getPeer(hw);
660 if (peer != null && peer.graphicsConfig != null) {
661 return peer.graphicsConfig;
662 }
663 return graphicsConfig;
664 }
If there are no objections I’ll push this version.
:
>
> It all looks plausible .. so +1 assuming no problems with the tests.
>
> -phil.
>
> On 03/16/2017 12:20 PM, Alexandr Scherbatiy wrote:
>>
>> The fix looks good to me.
>>
>> Thanks,
>> Alexandr.
>>
>> On 3/16/2017 7:44 PM, Sergey Bylokhov wrote:
>>> Hello,
>>> Please review the fix for jdk9.
>>>
>>> This bug was caused by the change in JDK8137571 where we started to use graphic configuration for each component to calculate the preferred size on the screen.
>>> The problem is that in the code we had a few assumptions that the left-top corner of the screen is 0.0. Moreover for the Menu we do not update the GC when the window is moved to another screen(I’ll file a separate bug for this).
>>>
>>> Fix description:
>>> - Menu components now tries to take the graphics configuration from the frame.
>>> - All calculations are updated to take into account that the left-top corner is screenBounds.x/y.
>>> - The choice component now updates the GC of its popup when its own gc is updated.
>>> - I intentionally do not reformat the change to simplify review.
>>>
>>> I have started the jck/jtreg tests, they are still in progress I'll notify if some new issues will be found.
>>>
>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8160270
>>> Webrev can be found at: http://cr.openjdk.java.net/~serb/8160270/webrev.00
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20170317/2fa8c47f/attachment.html>
More information about the awt-dev
mailing list