зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1508302 - Make IMContextWrapper::GetIMEName() refer XMODIFIERS env when gtk_im_multicontext_get_context_id() returns "wayland" r=m_kato
On Wayland, `gtk_im_multicontext_get_context_id()` returns `"wayland"`. However, we need to know actual IM which works behind Wayland. Fortunately, `XMODIFIERS` env includes IME name like "xim" case. Therefore, we can refer it instead. Differential Revision: https://phabricator.services.mozilla.com/D23469 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
8b09227fd0
Коммит
fb8cd0751d
|
@ -406,7 +406,8 @@ nsDependentCSubstring IMContextWrapper::GetIMName() const {
|
||||||
// If the context is XIM, actual engine must be specified with
|
// If the context is XIM, actual engine must be specified with
|
||||||
// |XMODIFIERS=@im=foo|.
|
// |XMODIFIERS=@im=foo|.
|
||||||
const char* xmodifiersChar = PR_GetEnv("XMODIFIERS");
|
const char* xmodifiersChar = PR_GetEnv("XMODIFIERS");
|
||||||
if (!im.EqualsLiteral("xim") || !xmodifiersChar) {
|
if (!xmodifiersChar ||
|
||||||
|
(!im.EqualsLiteral("xim") && !im.EqualsLiteral("wayland"))) {
|
||||||
return im;
|
return im;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче