On Wed, 27 Dec 2023 00:01:10 GMT, Martin Fox <m...@openjdk.org> wrote:

> The Mac screen coordinate system is inverted on the y-axis compared to JavaFX 
> so glass needs to flip the y coordinate. IM coordinates are relative to the 
> primary screen which is NSScreen.screens[0], not NSScreen.mainScreen 
> (mainScreen is the screen that contains the window that has focus).

The fix looks good.
While testing, I noticed a different issue:

- switch input language to Japanese, start typing `arigato` until the candidate 
list popup appears
- backspace to remove the popup
- move the application window
- type something to bring the IME popup again
I expect the IME popup to appear below the new caret position, but instead it 
pops up where it used to be:

![Screenshot 2024-01-08 at 16 05 
54](https://github.com/openjdk/jfx/assets/107069028/c46a6700-dde6-4b5d-90e2-cfd1af7e3ac0)

This might be a platform issue, since it can also be reproduced with TextEdit.  
Could you please confirm?

modules/javafx.graphics/src/main/native-glass/mac/GlassView3D.m line 814:

> 812:     NSRect result = [self->_delegate 
> getInputMethodCandidatePosRequest:0];
> 813:     if (NSScreen.screens.count) {
> 814:         NSRect screenFrame = NSScreen.screens[0].frame;

I assume this code block is not entered in the case of a single monitor?

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

PR Comment: https://git.openjdk.org/jfx/pull/1313#issuecomment-1882041019
PR Review Comment: https://git.openjdk.org/jfx/pull/1313#discussion_r1445502243

Reply via email to