Allow text input when necessary

This commit is contained in:
biroder
2026-03-05 12:47:42 +02:00
parent 2398b19490
commit cd811dedaa
+11 -1
View File
@@ -193,7 +193,7 @@ impl SDL2EventLoop {
window.set_icon(icon);
}
// Disable non-latin IMEFix stuck)
// Disable non-latin IME (fix stuck)
window.subsystem().text_input().stop();
@@ -1433,6 +1433,16 @@ impl ImguiSdl2 {
self.ignore_keyboard = io.want_capture_keyboard;
self.ignore_mouse = io.want_capture_mouse;
// Text input is disabled by default, as it causes freezing when IME is active
let text_util = window.subsystem().text_input();
if io.want_text_input != text_util.is_active() {
if io.want_text_input {
text_util.start();
} else {
text_util.stop();
}
}
}
pub fn prepare_render(&mut self, ui: &imgui::Ui, window: &sdl2::video::Window) {