RFR: 8231865: JFXPanel sends resize event with size 0x0 on HiDPI devices [v2]

Prasanta Sadhukhan psadhukhan at openjdk.org
Mon Jul 10 07:29:01 UTC 2023


On Fri, 7 Jul 2023 19:04:42 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Make pWidth/pHeight 0 after border insets if it's negative
>
> modules/javafx.swing/src/main/java/javafx/embed/swing/JFXPanel.java line 631:
> 
>> 629:         if (oldWidth == 0 && oldHeight == 0 && pWidth == 0 && pHeight == 0) {
>> 630:             return;
>> 631:         }
> 
> this change fixes the issue with the provided test code.
> 
> a few comments:
> 1. if I wrap textArea with a BorderPane, I never get width=0 (master branch)
> 2. would it make sense to add a check to line 611: if((pWidth == 0) && (pHeight == 0))?
> 3. lines 617, 618 subtract border insets, would that risk making pWidth/pHeight negative (considering code on lines 613, 614)?

I guess l618, 619 in PR takes care of pt 2,3 concern..

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1168#discussion_r1257834019


More information about the openjfx-dev mailing list