mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-13 12:44:48 +00:00
Fixed: Dead keys under Linux (Ubuntu was using ibus input method)
This commit is contained in:
parent
7e116c2738
commit
5127b7da8a
1 changed files with 25 additions and 15 deletions
|
@ -84,26 +84,36 @@ void CUnixEventEmitter::createIM()
|
||||||
|
|
||||||
XModifierKeymap *g_mod_map = XGetModifierMapping(_dpy);
|
XModifierKeymap *g_mod_map = XGetModifierMapping(_dpy);
|
||||||
|
|
||||||
char *modifiers = XSetLocaleModifiers(getenv("XMODIFIERS"));
|
_im = XOpenIM(_dpy, NULL, NULL, NULL);
|
||||||
|
|
||||||
|
if (_im == NULL)
|
||||||
|
{
|
||||||
|
XSetLocaleModifiers("@im=local");
|
||||||
|
|
||||||
_im = XOpenIM(_dpy, NULL, NULL, NULL);
|
_im = XOpenIM(_dpy, NULL, NULL, NULL);
|
||||||
|
|
||||||
|
if (_im == NULL)
|
||||||
|
{
|
||||||
|
XSetLocaleModifiers("@im=");
|
||||||
|
|
||||||
|
_im = XOpenIM(_dpy, NULL, NULL, NULL);
|
||||||
|
|
||||||
|
if (_im == NULL)
|
||||||
|
{
|
||||||
|
nlwarning("XOpenIM failed");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (_im)
|
if (_im)
|
||||||
{
|
{
|
||||||
_ic = XCreateIC(_im, XNInputStyle, XIMPreeditNothing | XIMStatusNothing, XNClientWindow, _win, XNFocusWindow, _win, NULL);
|
_ic = XCreateIC(_im, XNInputStyle, XIMPreeditNothing | XIMStatusNothing, XNClientWindow, _win, XNFocusWindow, _win, NULL);
|
||||||
// XSetICFocus(_ic);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_ic = 0;
|
|
||||||
nlwarning("XCreateIM failed");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!_ic)
|
if (!_ic)
|
||||||
{
|
{
|
||||||
nlwarning("XCreateIC failed");
|
nlwarning("XCreateIC failed");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue