On X11, don't require XIM to be present

In general, we may want to use xinput v2 for keyboard input in such
cases, so we have compose going, but for now just don't crash if
there's no XIM.
This commit is contained in:
Kirill Chibisov 2024-02-13 07:49:58 +04:00 committed by GitHub
parent 83012f4c1c
commit ea70f773d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 39 additions and 25 deletions

View file

@ -555,9 +555,9 @@ impl UnownedWindow {
leap!(xconn.select_xinput_events(window.xwindow, super::ALL_MASTER_DEVICES, mask))
.ignore_error();
{
let result = event_loop
.ime
// Try to create input context for the window.
if let Some(ime) = event_loop.ime.as_ref() {
let result = ime
.borrow_mut()
.create_context(window.xwindow as ffi::Window, false);
leap!(result);