Fix IME input handling (#20)

bevy_winit does not call `set_ime_allowed()` during initial window
creation when `Window::ime_enabled` is `true`. The `changed_windows`
system only fires when the value differs from cache, but the cache
is initialized from the window itself so they start equal. Since
winit 0.27+ requires explicit `set_ime_allowed(true)`, no Ime events
were ever generated.
This commit is contained in:
elm
2026-02-06 23:52:05 +09:00
committed by GitHub
parent 2afc7bb0de
commit 40a3455f55
5 changed files with 33 additions and 32 deletions

View File

@@ -5,7 +5,16 @@ use bevy_cef::prelude::*;
fn main() {
App::new()
.add_plugins((DefaultPlugins, CefPlugin::default()))
.add_plugins((
DefaultPlugins.set(WindowPlugin {
primary_window: Some(Window {
ime_enabled: true,
..default()
}),
..default()
}),
CefPlugin::default(),
))
.add_systems(
Startup,
(spawn_camera, spawn_directional_light, spawn_webview),