Commit 73bd2a30 authored by Naoki Fukino's avatar Naoki Fukino Committed by Chromium LUCI CQ

Add a crosapi flag for exo to support ime without workaround.

Adding a flag for the IME support which doesn't need the
ConsumedByIme() workaround.
When the flag kSupported is specified as a Lacros's init param,
Lacros expects that the key events and keysym events are sent
in separated APIs without filtered by ConsumedByIme().
exo's new behavior for this new flag is implemented in a follow-up CL.

Bug: 1093194
Test: None
Change-Id: Id01aa2b064fff6db6fe7420c42e39a99b9c87866
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2631545
Commit-Queue: Naoki Fukino <fukino@chromium.org>
Reviewed-by: default avatarHidehiko Abe <hidehiko@chromium.org>
Reviewed-by: default avatarRobert Kroeger <rjkroege@chromium.org>
Cr-Commit-Position: refs/heads/master@{#844466}
parent 6235db28
......@@ -200,9 +200,12 @@ enum ExoImeSupport {
// Note that this is an approach consistent with ARC's behavior.
kConsumedByImeWorkaround = 1,
// TODO(crbug.com/1093194): For long term, we're looking at a way to remove
// the above workaround. It will be exclusive state, so on implementing
// ash-chrome's fix, it is necessary to add a new value here, too, atomically.
// Exo sends keysym events to a client using a separate API.
// Once the client (lacros-chrome) gets ready to handle wl_keyboard::key and
// zwp_text_input_v1::keysym properly in separate paths, exo can send each
// each event without the ConsumedByIme() workaround above and tell the client
// that it dropped the workaround using kSupported flag.
[MinVersion=1] kSupported = 2,
};
// LacrosInitParams is a set of parameters for initialization of lacros-chrome,
......
......@@ -74,9 +74,8 @@ bool IsImeEnabled() {
// world becomes new enough.
const crosapi::mojom::LacrosInitParams* init_params =
lacros_chrome_service->init_params();
if (init_params &&
init_params->exo_ime_support ==
crosapi::mojom::ExoImeSupport::kConsumedByImeWorkaround) {
if (init_params && init_params->exo_ime_support !=
crosapi::mojom::ExoImeSupport::kUnsupported) {
return true;
}
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment