Skip to content

Commit 76d782d

Browse files
Fix IME window position not taking into account window transform
1 parent db57f28 commit 76d782d

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

scene/gui/line_edit.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ void LineEdit::_update_ime_window_position() {
132132
if (get_window()->get_embedder()) {
133133
pos += get_viewport()->get_popup_base_transform().get_origin();
134134
}
135+
// Take into account the window's transform.
136+
pos = get_window()->get_screen_transform().xform(pos);
135137
// The window will move to the updated position the next time the IME is updated, not immediately.
136138
DisplayServer::get_singleton()->window_set_ime_position(pos, wid);
137139
}

scene/gui/text_edit.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3427,6 +3427,8 @@ void TextEdit::_update_ime_window_position() {
34273427
if (get_window()->get_embedder()) {
34283428
pos += get_viewport()->get_popup_base_transform().get_origin();
34293429
}
3430+
// Take into account the window's transform.
3431+
pos = get_window()->get_screen_transform().xform(pos);
34303432
// The window will move to the updated position the next time the IME is updated, not immediately.
34313433
DisplayServer::get_singleton()->window_set_ime_position(pos, wid);
34323434
}

0 commit comments

Comments
 (0)