File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed
Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -5438,7 +5438,7 @@ void DisplayServerWindows::_process_key_events() {
54385438 k->set_physical_keycode (physical_keycode);
54395439 k->set_key_label (key_label);
54405440 k->set_unicode (fix_unicode (unicode));
5441- if (k->get_unicode () && ke.altgr ) {
5441+ if (k->get_unicode () && ke.altgr && windows[ke. window_id ]. ime_active ) {
54425442 k->set_alt_pressed (false );
54435443 k->set_ctrl_pressed (false );
54445444 }
@@ -5514,7 +5514,7 @@ void DisplayServerWindows::_process_key_events() {
55145514 }
55155515 k->set_unicode (fix_unicode (unicode));
55165516 }
5517- if (k->get_unicode () && ke.altgr ) {
5517+ if (k->get_unicode () && ke.altgr && windows[ke. window_id ]. ime_active ) {
55185518 k->set_alt_pressed (false );
55195519 k->set_ctrl_pressed (false );
55205520 }
Original file line number Diff line number Diff line change @@ -128,6 +128,7 @@ bool LineEdit::has_ime_text() const {
128128
129129void LineEdit::cancel_ime () {
130130 if (!has_ime_text ()) {
131+ _close_ime_window ();
131132 return ;
132133 }
133134 ime_text = String ();
@@ -140,6 +141,7 @@ void LineEdit::cancel_ime() {
140141
141142void LineEdit::apply_ime () {
142143 if (!has_ime_text ()) {
144+ _close_ime_window ();
143145 return ;
144146 }
145147
Original file line number Diff line number Diff line change @@ -3169,6 +3169,7 @@ bool TextEdit::has_ime_text() const {
31693169
31703170void TextEdit::cancel_ime () {
31713171 if (!has_ime_text ()) {
3172+ _close_ime_window ();
31723173 return ;
31733174 }
31743175 ime_text = String ();
@@ -3181,6 +3182,7 @@ void TextEdit::cancel_ime() {
31813182
31823183void TextEdit::apply_ime () {
31833184 if (!has_ime_text ()) {
3185+ _close_ime_window ();
31843186 return ;
31853187 }
31863188
You can’t perform that action at this time.
0 commit comments