From b961e8e94100231b36b6d1648a13f9bd40e0dffe Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Sun, 16 Nov 2025 16:31:39 +0900 Subject: [PATCH] winit-core: fix set_ime_allowed always panicing --- winit-core/src/window.rs | 2 +- winit/src/changelog/unreleased.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/winit-core/src/window.rs b/winit-core/src/window.rs index 3aa30e3d..aa7f1710 100644 --- a/winit-core/src/window.rs +++ b/winit-core/src/window.rs @@ -1136,7 +1136,7 @@ pub trait Window: AsAny + Send + Sync + fmt::Debug { let action = if allowed { let position = LogicalPosition::new(0, 0); let size = LogicalSize::new(0, 0); - let ime_caps = ImeCapabilities::new().without_hint_and_purpose().with_cursor_area(); + let ime_caps = ImeCapabilities::new().with_hint_and_purpose().with_cursor_area(); let request_data = ImeRequestData { hint_and_purpose: Some((ImeHint::NONE, ImePurpose::Normal)), // WARNING: there's nothing sensible to use here by default. diff --git a/winit/src/changelog/unreleased.md b/winit/src/changelog/unreleased.md index 50c1b204..93491753 100644 --- a/winit/src/changelog/unreleased.md +++ b/winit/src/changelog/unreleased.md @@ -50,3 +50,7 @@ changelog entry. - On Web, avoid throwing an exception in `EventLoop::run_app`, instead preferring to return to the caller. This requires passing a `'static` application to ensure that the application state will live as long as necessary. - On Web, the event loop can now always be re-created once it has finished running. + +### Fixed + +- Fixed panic when calling `Window::set_ime_allowed`.