RFR: 8305418: [Linux] Replace obsolete XIM as Input Method Editor [v22]
Martin Fox
mfox at openjdk.org
Sun Aug 18 21:37:00 UTC 2024
On Sun, 18 Aug 2024 20:10:09 GMT, Thiago Milczarek Sayao <tsayao at openjdk.org> wrote:
>> modules/javafx.graphics/src/main/java/com/sun/glass/ui/gtk/GtkView.java line 123:
>>
>>> 121: if (w != null) {
>>> 122: pos[0] -= (pos[0] > 0) ? ((w.getX() + getX())) : 0;
>>> 123: pos[1] -= (pos[1] > 0) ? ((w.getY() + getY())) : 0;
>>
>> This code will only adjust a position coordinate if it's positive. I can't easily test a dual-display Linux system but I'm pretty sure X or Y can be negative on a secondary display to the left or above the primary display. I think the conditional checks should be removed (but would appreciate a second opinion on this).
>>
>> By the way, I test on a Retina display at 200% scaling and the IM positioning is working as expected.
>
> I tested on both XWayland and Xorg. They are never negative.
>
> The input method window did always pop up on the right place.
>
> ![image](https://github.com/user-attachments/assets/05568b82-3602-48d0-acf1-65aabc8a316b)
>
> ![image](https://github.com/user-attachments/assets/14d29bc3-9e57-47c3-b573-f08871306c69)
Interesting. I just did a quick test on the Mac and verified that either coordinate can go negative. There must be a difference in the way the platform's model multiple monitors.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1080#discussion_r1721064868
More information about the openjfx-dev
mailing list