Bug 1753173 - part 2: Make `IMContextWrapper` set IME focus at receiving `NOTIFY_IME_...
commitdf03fca056db00d4d37c9534026d507eb3249617
authorMasayuki Nakano <masayuki@d-toybox.com>
Tue, 8 Feb 2022 00:41:12 +0000 (8 00:41 +0000)
committerMasayuki Nakano <masayuki@d-toybox.com>
Tue, 8 Feb 2022 00:41:12 +0000 (8 00:41 +0000)
tree9d7aec872c2178b91bc54abb214bc28611c137e0
parent1bf57ecab9f367634f5c4267fd119309b0c44d13
Bug 1753173 - part 2: Make `IMContextWrapper` set IME focus at receiving `NOTIFY_IME_OF_FOCUS` r=m_kato

Currently, it sets "input-purpose" and "input-hints" and notify IME of focus
at updating `InputContext`.  This occurs before receiving `NOTIFY_IME_OF_FOCUS`.
Therefore, at the moment, `IMContextWrapper` cannot access content cache, but
IME may query it.  E.g., IME may start composition immediately
(ibus-pinyin 1.5.0-6 does it).

For avoiding the trouble, `IMContextWrapper` should notify IME of focus when
and only when it receives `NOTIFY_IME_OF_FOCUS`.

Differential Revision: https://phabricator.services.mozilla.com/D137610
widget/gtk/IMContextWrapper.cpp
widget/gtk/IMContextWrapper.h