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:
parent
83012f4c1c
commit
ea70f773d3
4 changed files with 39 additions and 25 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue