|
@@ -848,7 +848,7 @@ void LineEdit::_notification(int p_what) {
|
|
|
}
|
|
|
|
|
|
if (has_focus()) {
|
|
|
- if (get_viewport()->get_window_id() != DisplayServer::INVALID_WINDOW_ID) {
|
|
|
+ if (get_viewport()->get_window_id() != DisplayServer::INVALID_WINDOW_ID && DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_IME)) {
|
|
|
DisplayServer::get_singleton()->window_set_ime_active(true, get_viewport()->get_window_id());
|
|
|
DisplayServer::get_singleton()->window_set_ime_position(get_global_position() + Point2(using_placeholder ? 0 : x_ofs, y_ofs + TS->shaped_text_get_size(text_rid).y), get_viewport()->get_window_id());
|
|
|
}
|
|
@@ -865,7 +865,7 @@ void LineEdit::_notification(int p_what) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (get_viewport()->get_window_id() != DisplayServer::INVALID_WINDOW_ID) {
|
|
|
+ if (get_viewport()->get_window_id() != DisplayServer::INVALID_WINDOW_ID && DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_IME)) {
|
|
|
DisplayServer::get_singleton()->window_set_ime_active(true, get_viewport()->get_window_id());
|
|
|
Point2 cursor_pos = Point2(get_cursor_position(), 1) * get_minimum_size().height;
|
|
|
DisplayServer::get_singleton()->window_set_ime_position(get_global_position() + cursor_pos, get_viewport()->get_window_id());
|
|
@@ -878,7 +878,7 @@ void LineEdit::_notification(int p_what) {
|
|
|
caret_blink_timer->stop();
|
|
|
}
|
|
|
|
|
|
- if (get_viewport()->get_window_id() != DisplayServer::INVALID_WINDOW_ID) {
|
|
|
+ if (get_viewport()->get_window_id() != DisplayServer::INVALID_WINDOW_ID && DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_IME)) {
|
|
|
DisplayServer::get_singleton()->window_set_ime_position(Point2(), get_viewport()->get_window_id());
|
|
|
DisplayServer::get_singleton()->window_set_ime_active(false, get_viewport()->get_window_id());
|
|
|
}
|