RFR: 8296621 - Stage steals focus on scene change

2022-11-08 Thread Thiago Milczarek Sayao
Simple fix to not requestFocus() on scene change. The attached bug sample shows that the TextField focused on the scene remains focused when the scene comes back. - Commit messages: - 8296621 - Stage steals focus on scene change - Merge branch 'openjdk:master' into master -

Re: requestFocus on setScene - is it right?

2022-11-08 Thread Thiago Milczarek Sayão
I have opened a bug about this: https://bugs.openjdk.org/browse/JDK-8296621 On Linux scene changes cause focus stealing. -- Thiago. Em seg., 7 de nov. de 2022 às 13:19, John Hendrikx escreveu: > Sorry, I was confused which requestFocus you meant, I was looking at > Scene#requestFocus(Node). >

Re: RFR: 8295078: TextField blurry when inside an TitledPane -> AnchorPane [v3]

2022-11-08 Thread Kevin Rushforth
On Tue, 8 Nov 2022 21:00:00 GMT, Andy Goryachev wrote: >> I'm not sure about this. Other places do the same, and there are lot of >> places actually which do something like `snappedLeftInsets` + >> `snappedRightInsets` or `final double w = snapSizeX(getWidth()) - x - >> snappedRightInset();`

Re: RFR: 8295078: TextField blurry when inside an TitledPane -> AnchorPane [v3]

2022-11-08 Thread Andy Goryachev
On Tue, 8 Nov 2022 20:29:40 GMT, Marius Hanl wrote: >> Not sure about render scale - it should be done elsewhere. >> >> As for snapping, I think this code might be incorrect - it should honor >> Region.snapToPixel setting. All the intermediary computations need to use >> unsnapped (original)

Re: RFR: 8296330: Tests: Add layout container snapping tests [v2]

2022-11-08 Thread Marius Hanl
On Mon, 7 Nov 2022 20:13:18 GMT, Andy Goryachev wrote: >> 1. Yes. We may want to create something like an 'epic'. I see that in the >> past it was called an 'umbrella issue' >> 2. Yeah we should, but the goal of this PR is to test all layout container, >> specified in `javafx.scene.layout`. >>

Re: JavaFX @ JavaOne 2022

2022-11-08 Thread Thiago Milczarek Sayão
I'm interested in watching the recording. All I found is young Kevin :) https://www.youtube.com/watch?v=B5EhaFSo8W0 Em ter., 1 de nov. de 2022 às 22:02, Philip Race escreveu: > > Very nice! Was the technical session recorded? > > In theory, yes, but we are still waiting to see to be sure

Re: RFR: 8295078: TextField blurry when inside an TitledPane -> AnchorPane [v3]

2022-11-08 Thread Marius Hanl
On Tue, 8 Nov 2022 18:31:33 GMT, Andy Goryachev wrote: >> Not 100% sure about this. It sounds somewhat logical. If we set the left >> anchor to be 5. Do we expect it to be 10 with a render scale of 2 -> 200% >> resolution? > > Not sure about render scale - it should be done elsewhere. > > As

Re: RFR: 8295078: TextField blurry when inside an TitledPane -> AnchorPane [v3]

2022-11-08 Thread Marius Hanl
On Tue, 8 Nov 2022 18:37:16 GMT, Andy Goryachev wrote: >> Marius Hanl has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8295078: Replace JUnit4 with Junit5 imports > >

Re: RFR: 8295078: TextField blurry when inside an TitledPane -> AnchorPane [v3]

2022-11-08 Thread Andy Goryachev
On Tue, 8 Nov 2022 17:39:27 GMT, Marius Hanl wrote: >> modules/javafx.graphics/src/main/java/javafx/scene/layout/AnchorPane.java >> line 353: >> >>> 351: >>> 352: if (leftAnchor != null) { >>> 353: x = snappedLeftInset() + leftAnchor; >> >> Question: should we use

Re: RFR: 8295078: TextField blurry when inside an TitledPane -> AnchorPane [v3]

2022-11-08 Thread Andy Goryachev
On Thu, 3 Nov 2022 21:21:42 GMT, Marius Hanl wrote: >> The problem here is, that the `AnchorPane` does not use its snapped insets. >> Therefore, the fix is to replace all `getInsets().getXXX` calls with their >> corresponding `snappedXXXInset()` methods. >> >> Note: The reason the `AnchorPane`

Re: RFR: 8295078: TextField blurry when inside an TitledPane -> AnchorPane [v3]

2022-11-08 Thread Marius Hanl
On Tue, 8 Nov 2022 18:13:59 GMT, Andy Goryachev wrote: >> Not sure if this is worth it for just 2 occurrences. In general I always try >> not to clutter the test class with things used in only one or two test >> methods. > > I see 6 occurrences only in this method ;-) ok :D still not sure if

Re: RFR: 8222210: JFXPanel popups open at wrong coordinates when using multiple hidpi monitors [v4]

2022-11-08 Thread Andy Goryachev
On Tue, 8 Nov 2022 18:16:52 GMT, Johan Vos wrote: >> The root problem is actually broader than stated in the JBS issue. This PR >> now translates screencoordinates from absolute coordinates into coordinates >> that take the platformScale into account. >> The whole process is complicated by

Re: RFR: 8222210: JFXPanel popups open at wrong coordinates when using multiple hidpi monitors [v4]

2022-11-08 Thread Johan Vos
> The root problem is actually broader than stated in the JBS issue. This PR > now translates screencoordinates from absolute coordinates into coordinates > that take the platformScale into account. > The whole process is complicated by the fact that throughout our code, we use > e.g. `x` and

Re: RFR: 8222210: JFXPanel popups open at wrong coordinates when using multiple hidpi monitors [v4]

2022-11-08 Thread Kevin Rushforth
On Tue, 8 Nov 2022 18:16:52 GMT, Johan Vos wrote: >> The root problem is actually broader than stated in the JBS issue. This PR >> now translates screencoordinates from absolute coordinates into coordinates >> that take the platformScale into account. >> The whole process is complicated by

Re: RFR: 8295078: TextField blurry when inside an TitledPane -> AnchorPane [v3]

2022-11-08 Thread Andy Goryachev
On Tue, 8 Nov 2022 17:36:18 GMT, Marius Hanl wrote: >> modules/javafx.graphics/src/test/java/test/javafx/scene/layout/AnchorPaneTest.java >> line 765: >> >>> 763: double snappedPaddingY = child.snapPositionY(padding); >>> 764: >>> 765: assertEquals(snappedPaddingX,

Re: RFR: 8295078: TextField blurry when inside an TitledPane -> AnchorPane [v3]

2022-11-08 Thread Andy Goryachev
On Thu, 3 Nov 2022 21:21:42 GMT, Marius Hanl wrote: >> The problem here is, that the `AnchorPane` does not use its snapped insets. >> Therefore, the fix is to replace all `getInsets().getXXX` calls with their >> corresponding `snappedXXXInset()` methods. >> >> Note: The reason the `AnchorPane`

Re: RFR: 8295078: TextField blurry when inside an TitledPane -> AnchorPane [v3]

2022-11-08 Thread Marius Hanl
On Tue, 8 Nov 2022 16:40:11 GMT, Andy Goryachev wrote: >> Marius Hanl has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8295078: Replace JUnit4 with Junit5 imports > >

Re: RFR: 8296330: Tests: Add layout container snapping tests [v4]

2022-11-08 Thread Marius Hanl
> While checking https://bugs.openjdk.org/browse/JDK-8295078 I found much more > layout container which do not snap their children correctly. > > The goal of this PR is to add snapping tests for all layout container. > After that we can create issues for all broken layout container, fix them and

Re: RFR: 8295078: TextField blurry when inside an TitledPane -> AnchorPane [v3]

2022-11-08 Thread Marius Hanl
On Tue, 8 Nov 2022 16:38:02 GMT, Andy Goryachev wrote: >> Marius Hanl has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8295078: Replace JUnit4 with Junit5 imports > >

Re: RFR: 8296409: Multiple copies of accelerator change listeners are added to MenuItems, but only 1 is removed

2022-11-08 Thread Kevin Rushforth
On Tue, 8 Nov 2022 10:11:40 GMT, Dean Wookey wrote: > I clicked the request review on andy and it removed arapte for some reason. I > guess that button shouldn't be clicked. Oops. That seems like a GitHub UI problem. I'll re-request a review from @arapte - PR:

Re: RFR: 8295078: TextField blurry when inside an TitledPane -> AnchorPane [v3]

2022-11-08 Thread Ambarish Rapte
On Thu, 3 Nov 2022 21:21:42 GMT, Marius Hanl wrote: >> The problem here is, that the `AnchorPane` does not use its snapped insets. >> Therefore, the fix is to replace all `getInsets().getXXX` calls with their >> corresponding `snappedXXXInset()` methods. >> >> Note: The reason the `AnchorPane`

Re: RFR: 8296409: Multiple copies of accelerator change listeners are added to MenuItems, but only 1 is removed

2022-11-08 Thread Dean Wookey
On Fri, 4 Nov 2022 19:51:53 GMT, Kevin Rushforth wrote: >> When menu buttons are added and removed from the scene, an accelerator >> change listener is added to each menu item in the menu. There is nothing >> stopping the same change listener being added multiple times. >> >>

Re: RFR: 8296409: Multiple copies of accelerator change listeners are added to MenuItems, but only 1 is removed [v2]

2022-11-08 Thread Dean Wookey
On Mon, 7 Nov 2022 18:11:28 GMT, Dean Wookey wrote: >> modules/javafx.controls/src/main/java/javafx/scene/control/skin/MenuButtonSkinBase.java >> line 154: >> >>> 152: sceneChangeListener = (scene, oldValue, newValue) -> { >>> 153: if (oldValue != null) { >>> 154: