From 72310b54efc03e5fed59f4308a2b89aaa1f4838b Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Sun, 9 Oct 2022 09:55:19 +0300 Subject: [PATCH] On X11, fix IME crashing without available styles Fixes #2510. --- CHANGELOG.md | 1 + .../linux/x11/ime/input_method.rs | 35 ++++++++++--------- src/platform_impl/linux/x11/ime/mod.rs | 8 +++-- 3 files changed, 24 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c30e7e5b1e..97f55fcab04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ And please only add new entries to the top of this list, right below the `# Unre - On Wayland, `wayland-csd-adwaita` now uses `ab_glyph` instead of `crossfont` to render the title for decorations. - On Wayland, a new `wayland-csd-adwaita-crossfont` feature was added to use `crossfont` instead of `ab_glyph` for decorations. - On Wayland, if not otherwise specified use upstream automatic CSD theme selection. +- On X11, fix XIM not picking IME when no styles advertised. # 0.27.3 diff --git a/src/platform_impl/linux/x11/ime/input_method.rs b/src/platform_impl/linux/x11/ime/input_method.rs index 944d63c8892..3faf596fa00 100644 --- a/src/platform_impl/linux/x11/ime/input_method.rs +++ b/src/platform_impl/linux/x11/ime/input_method.rs @@ -40,26 +40,36 @@ unsafe fn open_im(xconn: &Arc, locale_modifiers: &CStr) -> Option, + pub none_style: Option