Skip to content

Fix IME window position not taking into account window transform #107413

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2025

Conversation

roughbits01
Copy link
Contributor

Fixes #107411

Before:

Screen.Recording.2025-06-11.at.17.25.12.mov

After:

Screen.Recording.2025-06-11.at.17.26.55.mov

@roughbits01 roughbits01 requested a review from a team as a code owner June 11, 2025 15:44
@bruvzg bruvzg self-requested a review June 11, 2025 15:46
@bruvzg bruvzg added this to the 4.5 milestone Jun 11, 2025
Copy link
Member

@adamscott adamscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, @roughbits01 !

@Sauermann
Copy link
Contributor

I'm wondering, if there are other cases besides IME LineEdit and TextEdit, where this issue happens.
In that case this fix would be better moved to get_popup_base_transform, so that other nodes also benefit from this fix.

@roughbits01
Copy link
Contributor Author

I'm wondering, if there are other cases besides IME LineEdit and TextEdit, where this issue happens. In that case this fix would be better moved to get_popup_base_transform, so that other nodes also benefit from this fix.

I can't seem to find any documentation about get_popup_base_transform. Do you know why is it used here? Maybe @bruvzg knows. Also note that get_popup_base_transform is never called when I tested (running the MRP on MacOS ) because get_window()->get_embedder() is null.

@bruvzg
Copy link
Member

bruvzg commented Jun 12, 2025

'popup_base_transform`, is for native windows, which are completely independent of parent and use screen coordinates. But IME is a sub element of the native window, and uses native window client area coordinates. So it's a different thing. I do not think there are any other cases of IME use except line/text edit.

@akien-mga akien-mga added the cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release label Jun 12, 2025
@akien-mga akien-mga merged commit c3ce623 into godotengine:master Jun 12, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release topic:gui topic:input
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IME window position does not take into account window transform
5 participants