linux: Fix enter key triggering newline instead of commiting input (#39599)

Closes #31337 #35537

Release Notes:

- Fixed an issue on Linux X11 where pressing Enter added a new line
instead of confirming English input.
This commit is contained in:
Smit Barmase
2025-10-06 18:22:02 +05:30
committed by GitHub
parent 81ada92306
commit 2c1cc01b81
+1 -9
View File
@@ -1315,17 +1315,9 @@ impl X11Client {
return None;
};
let mut state = self.0.borrow_mut();
let keystroke = state.pre_key_char_down.take();
state.composing = false;
drop(state);
if let Some(mut keystroke) = keystroke {
keystroke.key_char = Some(text);
window.handle_input(PlatformInput::KeyDown(crate::KeyDownEvent {
keystroke,
is_held: false,
}));
}
window.handle_ime_commit(text);
Some(())
}