You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-28 16:07:14 +00:00
[IME] Do not redraw and move caret on IME update w/o text/position changes.
This commit is contained in:
@@ -1633,9 +1633,15 @@ void TextEdit::_notification(int p_what) {
|
||||
|
||||
case MainLoop::NOTIFICATION_OS_IME_UPDATE: {
|
||||
if (has_focus()) {
|
||||
const String &new_ime_text = DisplayServer::get_singleton()->ime_get_text();
|
||||
const Vector2i &new_ime_selection = DisplayServer::get_singleton()->ime_get_selection();
|
||||
if (ime_text == new_ime_text && ime_selection == new_ime_selection) {
|
||||
break;
|
||||
}
|
||||
|
||||
bool had_ime_text = has_ime_text();
|
||||
ime_text = DisplayServer::get_singleton()->ime_get_text();
|
||||
ime_selection = DisplayServer::get_singleton()->ime_get_selection();
|
||||
ime_text = new_ime_text;
|
||||
ime_selection = new_ime_selection;
|
||||
|
||||
if (!had_ime_text && has_ime_text()) {
|
||||
_cancel_drag_and_drop_text();
|
||||
|
||||
Reference in New Issue
Block a user