|
@@ -1633,9 +1633,15 @@ void TextEdit::_notification(int p_what) {
|
|
|
|
|
|
case MainLoop::NOTIFICATION_OS_IME_UPDATE: {
|
|
case MainLoop::NOTIFICATION_OS_IME_UPDATE: {
|
|
if (has_focus()) {
|
|
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();
|
|
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()) {
|
|
if (!had_ime_text && has_ime_text()) {
|
|
_cancel_drag_and_drop_text();
|
|
_cancel_drag_and_drop_text();
|