On Fri, 19 Jan 2024 23:39:59 GMT, Andy Goryachev <ango...@openjdk.org> wrote:

>> Martin Fox has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Switched to local array variables
>
> I think this code crashes on macOS with Arabic input...
> 
> correction: not crashes, but throws an NPE, see 
> https://bugs.openjdk.org/browse/JDK-8324232

@andy-goryachev-oracle I can reproduce the misplaced input window problem on 
Win 11. I added some println statements and verified that JavaFX is returning 
correct coordinates. My guess is that this is an OS issue though there's the 
small chance that the problem is in Swing.

I'll update JDK-8324232 with some notes. As you've figured out it's an existing 
problem that predates this PR.

> modules/javafx.swing/src/main/java/javafx/embed/swing/InputMethodSupport.java 
> line 132:
> 
>> 130:             }
>> 131:             if (selected[0] == null) selected[0] = "";
>> 132:             return new AttributedString(selected[0]).getIterator();
> 
> AtomicReference<String> ref = ...
> ...
> String s = ref.get();
> return new AttributedString(s == null ? "" : s).getIterator();
> 
> 
> here and L102?

I'm not familiar enough with AtomicReference to have an opinion on this. 
Someone else will have to weigh in on this.

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

PR Comment: https://git.openjdk.org/jfx/pull/1337#issuecomment-1901527510
PR Review Comment: https://git.openjdk.org/jfx/pull/1337#discussion_r1460108537

Reply via email to