mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-28 07:48:37 -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.
|
||||
_im = XOpenIM(_display, nullptr, nullptr, nullptr);
|
||||
if (_im == (XIM)nullptr) {
|
||||
x11display_cat.warning()
|
||||
<< "Couldn't open input method.\n";
|
||||
// Fall back to internal input method.
|
||||
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?
|
||||
|
Loading…
x
Reference in New Issue
Block a user