mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 00:06:44 -04:00
x11: fall back to @im=none if XOpenIM failed
This helps if the user has configured an invalid input method in their XMODIFIERS variable.
This commit is contained in:
parent
b225a3260b
commit
4383fceba2
@ -278,8 +278,13 @@ x11GraphicsPipe(const std::string &display) :
|
|||||||
// Connect to an input method for supporting international text entry.
|
// Connect to an input method for supporting international text entry.
|
||||||
_im = XOpenIM(_display, nullptr, nullptr, nullptr);
|
_im = XOpenIM(_display, nullptr, nullptr, nullptr);
|
||||||
if (_im == (XIM)nullptr) {
|
if (_im == (XIM)nullptr) {
|
||||||
x11display_cat.warning()
|
// Fall back to internal input method.
|
||||||
<< "Couldn't open input method.\n";
|
XSetLocaleModifiers("@im=none");
|
||||||
|
_im = XOpenIM(_display, nullptr, nullptr, nullptr);
|
||||||
|
if (_im == (XIM)nullptr) {
|
||||||
|
x11display_cat.warning()
|
||||||
|
<< "Couldn't open input method.\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// What styles does the current input method support?
|
// What styles does the current input method support?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user