Re: RFR: 8314215: Trailing Spaces before Line Breaks Affect the Center Alignment of Text [v15]

2024-04-22 Thread John Hendrikx
On Mon, 22 Apr 2024 16:52:16 GMT, Andy Goryachev wrote: > 2. resolve the problems with the fonts (could we pick the font(s) that are > available via some utility method?) I already left a comment on this before, see here: https://github.com/openjdk/jfx/pull/1236#issuecomment-1939200760 The

Re: RFR: 8314215: Trailing Spaces before Line Breaks Affect the Center Alignment of Text [v16]

2024-04-22 Thread John Hendrikx
> There are a number of tickets open related to text rendering: > > https://bugs.openjdk.org/browse/JDK-8314215 > > https://bugs.openjdk.org/browse/JDK-8145496 > > https://bugs.openjdk.org/browse/JDK-8129014 > > They have in common that wrapped text is taking the trailing spaces on each >

Re: RFR: 8328577: Toolbar's overflow button overlaps the items [v6]

2024-04-22 Thread Karthik P K
On Mon, 15 Apr 2024 15:41:19 GMT, eduardsdv wrote: >> This change fixes the calculation of which nodes go to the toolbar and which >> go to the overflow menu. >> It is now determined before the nodes are removed from the scene graph. >> This is important because the values returned by >>

Re: RFR: 8314215: Trailing Spaces before Line Breaks Affect the Center Alignment of Text [v15]

2024-04-22 Thread John Hendrikx
On Mon, 12 Feb 2024 10:00:57 GMT, Karthik P K wrote: >> John Hendrikx has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Change test to use the more common Arial font and add assumptions > > I ran the tests in my Mac system with macOS 14.3

Re: RFR: 8146918: ConcurrentModificationException in MediaPlayer [v3]

2024-04-22 Thread Alexander Matveev
On Mon, 22 Apr 2024 15:05:07 GMT, n-gabe wrote: >> There is a ConcurrentModificationException in MediaPlayer when removing a >> MediaView from it. The root cause is that you can't iterate over a HashSet >> with for (WeakReference vref : viewRefs) and removing items from >> the collection by

Re: Wayland

2024-04-22 Thread Nir Lisker
Not sure it helps with warmup, but marking a foreign function as critical can improve performance: https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/lang/foreign/Linker.Option.html#critical(boolean) . On Mon, Apr 22, 2024 at 10:02 PM Philip Race wrote: > No, it wasn't. I didn't

Re: Wayland

2024-04-22 Thread Philip Race
No, it wasn't. I didn't even use jextracted code. The startup cost is around initialisation of FFM - around 70 ms (IIRC) overhead on my MacBook Then creation of VarHandles and MethodHandles - 2-5 ms each is what I measured, so do these lazily if you can. And warmup cost is that it takes about

Re: Wayland

2024-04-22 Thread Thiago Milczarek Sayão
I think the startup time might be related to all static symbol lookups. So I'm manually including just what is needed: jextract --output src -t com.sun.glass.wayland.extracted \ --header-class-name GlassWayland \ `pkg-config --libs glib-2.0 gio-2.0 libportal wayland-client` \ `pkg-config

Re: RFR: 8313138: Horizontal Scrollbar Keyboard enhancement [v5]

2024-04-22 Thread Andy Goryachev
On Mon, 1 Apr 2024 19:27:17 GMT, Andy Goryachev wrote: >> Adding alt-ctrl-LEFT/RIGHT (option-command-LEFT/RIGHT) key bindings to >> >> - ListView >> - TreeView >> - TableView >> - TreeTableView >> >> to support keyboard-only horizontal scrolling. The main reason for the >> change is to

Re: RFR: 8092102: Labeled: truncated property [v9]

2024-04-22 Thread Andy Goryachev
On Wed, 10 Apr 2024 21:25:10 GMT, Andy Goryachev wrote: >> Adds **Labeled.textTruncated** property which indicates when the text is >> visually truncated (and the ellipsis string is inserted) in order to fit the >> available width. >> >> The new property reacts to changes in the following

Re: RFR: 8314215: Trailing Spaces before Line Breaks Affect the Center Alignment of Text [v15]

2024-04-22 Thread Andy Goryachev
On Sat, 10 Feb 2024 17:24:17 GMT, John Hendrikx wrote: >> There are a number of tickets open related to text rendering: >> >> https://bugs.openjdk.org/browse/JDK-8314215 >> >> https://bugs.openjdk.org/browse/JDK-8145496 >> >> https://bugs.openjdk.org/browse/JDK-8129014 >> >> They have in

Re: Wayland

2024-04-22 Thread Philip Race
As a reminder, using FFM will require all FX *applications* to specify --enable-native-access on the command line Although this is likely coming to JNI soon too. https://docs.oracle.com/en/java/javase/21/core/restricted-methods.html But one thing to watch out for with FFM is startup + warm up

Re: Wayland

2024-04-22 Thread Nir Lisker
Sorry, we bumped to Java 21 in JavaFX 22 I think since we preserve the N-1 rule. On Mon, Apr 22, 2024 at 6:03 PM Nir Lisker wrote: > I think that we'll be able to bump to Java 25 in JavaFX 25, like we did > with 21. I suggested initially to bump to Java 22 exactly for FFM as it's > very useful

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v7]

2024-04-22 Thread Kevin Rushforth
On Fri, 19 Apr 2024 18:27:12 GMT, Oliver Kopp wrote: > > I think you need to add > > The mentioned issue is fixed. Now, I get > > ``` > java.lang.UnsatisfiedLinkError: 'void > com.sun.glass.ui.win.WinTextRangeProvider._initIDs()' > at >

Re: RFR: 8328577: Toolbar's overflow button overlaps the items [v6]

2024-04-22 Thread Kevin Rushforth
On Mon, 22 Apr 2024 15:31:25 GMT, Andy Goryachev wrote: > let's try this one: > > Reviewer: @karthikpandelu Yep. There is no Skara command to request a review from someone. The `/reviewer` is use to credit someone who has not done a review in GitHub (and is not expected to), but who has

Re: RFR: 8328577: Toolbar's overflow button overlaps the items [v6]

2024-04-22 Thread Andy Goryachev
On Mon, 15 Apr 2024 15:41:19 GMT, eduardsdv wrote: >> This change fixes the calculation of which nodes go to the toolbar and which >> go to the overflow menu. >> It is now determined before the nodes are removed from the scene graph. >> This is important because the values returned by >>

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v9]

2024-04-22 Thread Andy Goryachev
On Sat, 20 Apr 2024 14:50:15 GMT, Oliver Kopp wrote: >> modules/javafx.graphics/src/main/java/com/sun/glass/ui/win/WinTextRangeProvider.java >> line 116: >> >>> 114: return fixedMaxEnd; >>> 115: } >>> 116: } >> >> Frankly, I have hard time understanding this code

Re: RFR: 8328577: Toolbar's overflow button overlaps the items [v6]

2024-04-22 Thread Andy Goryachev
On Mon, 22 Apr 2024 08:34:34 GMT, eduardsdv wrote: > closing the overflow-menu with the ESC key when the currently focused Node > (e.g. ListView) processes the ESC itself. On macOS, option-ESC closes the overflow menu. - PR Comment:

Re: [External] : Re: Wayland

2024-04-22 Thread Kevin Rushforth
Your math is a bit off: it's 2 years from now, not 7. We recently bumped the minimum for JavaFX 23 to JDK 21. Two years from now, we will bump the minimum for JavaFX 27 to JDK 25. We might consider bumping it even earlier to a non-LTS, as an exception to our general practice, specifically to

Re: RFR: 8146918: ConcurrentModificationException in MediaPlayer [v2]

2024-04-22 Thread n-gabe
On Mon, 22 Apr 2024 13:52:39 GMT, Kevin Rushforth wrote: >> n-gabe has updated the pull request incrementally with one additional commit >> since the last revision: >> >> Update Copyright > > modules/javafx.media/src/main/java/javafx/scene/media/MediaPlayer.java line 2: > >> 1: /* >> 2: *

Re: RFR: 8146918: ConcurrentModificationException in MediaPlayer [v3]

2024-04-22 Thread n-gabe
> There is a ConcurrentModificationException in MediaPlayer when removing a > MediaView from it. The root cause is that you can't iterate over a HashSet > with for (WeakReference vref : viewRefs) and removing items from > the collection by viewRefs.remove(vref); within this loop. n-gabe has

Re: Wayland

2024-04-22 Thread Nir Lisker
I think that we'll be able to bump to Java 25 in JavaFX 25, like we did with 21. I suggested initially to bump to Java 22 exactly for FFM as it's very useful for JavaFX, but was told we shouldn't since it's not an LTS version. I have no idea how long the work on Wayland will take including the

Re: Wayland

2024-04-22 Thread Thiago Milczarek Sayão
I was just experimenting, but it seems to be less work than going with JNI. If I am correct, the next Java LTS will be 25, which will be required on JavaFX 29 to be released on September/29. It's 7 years - that's really too much. Maybe it's still worthwhile to prototype using FFM and then port

Re: RFR: 8146918: ConcurrentModificationException in MediaPlayer [v2]

2024-04-22 Thread Kevin Rushforth
On Sun, 21 Apr 2024 14:39:46 GMT, n-gabe wrote: >> There is a ConcurrentModificationException in MediaPlayer when removing a >> MediaView from it. The root cause is that you can't iterate over a HashSet >> with for (WeakReference vref : viewRefs) and removing items from >> the collection by

Re: Wayland

2024-04-22 Thread Kevin Rushforth
Note also that we cannot use Panama in the JavaFX internals yet, since the minimum version of the JDK is 21. -- Kevin On 4/21/2024 10:51 AM, Thiago Milczarek Sayão wrote: Hi, I did a small test app to explore Wayland client and portals (for Robot and dialogs such as file open/save).

Re: RFR: 8328577: Toolbar's overflow button overlaps the items [v6]

2024-04-22 Thread eduardsdv
On Mon, 15 Apr 2024 15:41:19 GMT, eduardsdv wrote: >> This change fixes the calculation of which nodes go to the toolbar and which >> go to the overflow menu. >> It is now determined before the nodes are removed from the scene graph. >> This is important because the values returned by >>

Re: Wayland

2024-04-22 Thread Nir Lisker
Ah, yes, opaque types are indeed unsupported: https://github.com/openjdk/jextract/blob/master/doc/GUIDE.md#unsupported-features. As Jorn said there, if the API exposes methods that use opaque types, then you wouldn't have a problem. Also, if you have the .c file where they are defined, jextract