diff --git a/widget/gtk/IMContextWrapper.cpp b/widget/gtk/IMContextWrapper.cpp index a90f48fd4229..2c0ff54e9cb2 100644 --- a/widget/gtk/IMContextWrapper.cpp +++ b/widget/gtk/IMContextWrapper.cpp @@ -406,7 +406,8 @@ nsDependentCSubstring IMContextWrapper::GetIMName() const { // If the context is XIM, actual engine must be specified with // |XMODIFIERS=@im=foo|. const char* xmodifiersChar = PR_GetEnv("XMODIFIERS"); - if (!im.EqualsLiteral("xim") || !xmodifiersChar) { + if (!xmodifiersChar || + (!im.EqualsLiteral("xim") && !im.EqualsLiteral("wayland"))) { return im; }