mirror of
https://github.com/mehah/otclient
synced 2026-08-15 16:29:06 -04:00
fix(platform): add XIM fallback with @im=none on Linux (#1806)
Bug Fixes: - Improved input-method initialization on X11 by retrying with a fallback backend when the initial connection fails. - Preserved clear error handling if both connection attempts are unsuccessful.
This commit is contained in:
parent
8f55d88980
commit
3a049b36b3
1 changed files with 5 additions and 0 deletions
|
|
@ -539,6 +539,11 @@ bool X11Window::internalSetupWindowInput()
|
|||
|
||||
XSetLocaleModifiers("");
|
||||
m_xim = XOpenIM(m_display, nullptr, nullptr, nullptr);
|
||||
if (!m_xim) {
|
||||
// Fallback to internal XIM if ibus/fcitx daemon is unavailable or incompatible
|
||||
XSetLocaleModifiers("@im=none");
|
||||
m_xim = XOpenIM(m_display, nullptr, nullptr, nullptr);
|
||||
}
|
||||
if (!m_xim) {
|
||||
g_logger.error("XOpenIM failed");
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue