Repository navigation
Fix IME candidate window position for text fields - #399
Conversation
2ab249b to
31a1b9b
Compare
Chitak985
left a comment
There was a problem hiding this comment.
Additionally to the issues, you (or someone else) should test it on linux and mac os.
|
Thanks for the review! I fixed both points in dc95e23. I also tested it on Linux:
The candidate window shows up right below the text field in the world name field, chat, creative search and NEI search. On IBus, the composition text is shown in the candidate window instead of the text field. This is because lwjgl3ify doesn't set I don't have a Mac, and I couldn't test Wayland (the pixel density stays 1.0 on X11). It would be great if someone could test those. |
|
Froze the PR so it doesn't get merged in case Mac testing is required |
|
oh |
|
oh to late . sorry didnt see the tag |
|
should i test it in full pack ? |
|
it's probably fine tbh |
|
do you have a Mac? |
|
no sadly not |
|
Windows and Linux both work so I think it's fine |
|
we an ship it and when we get a bug report from mac user we can revert it |



Summary
Fixes #371
Pass the position of the focused text field to SDL, so the IME candidate window shows up next to where you are typing.
Changes:
GuiTextField's rect and caret position withSDL_SetTextInputAreaGuiTextField(signs, books, etc. stay at the top-left as before)GuiTextFieldwhose font renderer is null (NEI's recipe search field)Tested on GTNH 2.9.1 (Windows 11, Microsoft IME, Java 25):
Limitations:
borderless=false) the candidate window is not shown at all (same as before this change). It shows withborderless=true.GuiTextField(signs, books, BetterQuesting, etc.) are not covered.Checklist