Merge pull request #98887 from bruvzg/ime_altgr
Fix IME deactivation events not send on focus loss. Do not unset AltGr modifiers in non-IME input.
This commit is contained in:
commit
f74b7e2009
3 changed files with 6 additions and 2 deletions
|
|
@ -5438,7 +5438,7 @@ void DisplayServerWindows::_process_key_events() {
|
|||
k->set_physical_keycode(physical_keycode);
|
||||
k->set_key_label(key_label);
|
||||
k->set_unicode(fix_unicode(unicode));
|
||||
if (k->get_unicode() && ke.altgr) {
|
||||
if (k->get_unicode() && ke.altgr && windows[ke.window_id].ime_active) {
|
||||
k->set_alt_pressed(false);
|
||||
k->set_ctrl_pressed(false);
|
||||
}
|
||||
|
|
@ -5514,7 +5514,7 @@ void DisplayServerWindows::_process_key_events() {
|
|||
}
|
||||
k->set_unicode(fix_unicode(unicode));
|
||||
}
|
||||
if (k->get_unicode() && ke.altgr) {
|
||||
if (k->get_unicode() && ke.altgr && windows[ke.window_id].ime_active) {
|
||||
k->set_alt_pressed(false);
|
||||
k->set_ctrl_pressed(false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -128,6 +128,7 @@ bool LineEdit::has_ime_text() const {
|
|||
|
||||
void LineEdit::cancel_ime() {
|
||||
if (!has_ime_text()) {
|
||||
_close_ime_window();
|
||||
return;
|
||||
}
|
||||
ime_text = String();
|
||||
|
|
@ -140,6 +141,7 @@ void LineEdit::cancel_ime() {
|
|||
|
||||
void LineEdit::apply_ime() {
|
||||
if (!has_ime_text()) {
|
||||
_close_ime_window();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3169,6 +3169,7 @@ bool TextEdit::has_ime_text() const {
|
|||
|
||||
void TextEdit::cancel_ime() {
|
||||
if (!has_ime_text()) {
|
||||
_close_ime_window();
|
||||
return;
|
||||
}
|
||||
ime_text = String();
|
||||
|
|
@ -3181,6 +3182,7 @@ void TextEdit::cancel_ime() {
|
|||
|
||||
void TextEdit::apply_ime() {
|
||||
if (!has_ime_text()) {
|
||||
_close_ime_window();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue