Skip to content

Allow XOpenIM to return NULL? #277

@liuw

Description

@liuw

https://github.com/tomaka/winit/blob/3d1c18ded9f82c17e292c03e5740cb558800c30c/src/platform/linux/x11/mod.rs#L697

Winit will panic if XOpenIM returns NULL. It is too strict IMHO. As it stands, winit can't find a valid input method.

I would much prefer the way urxvt does it:

xim = XOpenIM (display->dpy, 0, 0, 0);

if (!xim)
    return false;

This is in relation to alacritty/alacritty/issues/732

(I'm in no way an expert on X11.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    DS - x11Affects the X11 backend, or generally free Unix platformsS - enhancementWouldn't this be the coolest?

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions