• Hidehiko Abe's avatar
    exo: Do not send text_input::keysym, if it is not IME consumed one. · 18c7a65b
    Hidehiko Abe authored
    Currently, some key combinations, such as CTRL+V, is sent twice
    from exo to wayland client via wl_keyboard::key and text_input::keysym.
    Because, currently Lacros converts both to KeyEvent, so in Lacros
    the KeyEvent is dispatched twice, which is unexpected behavior.
    
    The long term solution is not to dispatch KeyEvent converted from
    text_input::keysym in Lacros, and instead, call
    TextInputClient::InsertChar directly.
    However, this approach hits another issue. Currently, exo does
    not send wl_keyboard::key event, if the delivered KeyEvent is
    being consumed by IME. This is the workaround for ARC, and planned
    to be removed in the near future.
    
    So, to workaround consumed-by-ime filtering for the short term,
    this CL introduces another filtering into text_input::keysym with
    the reversed condition, so that, KeyEvent dispatching in Lacros
    will become once.
    
    BUG=1149371
    TEST=Ran on DUT. Ran exo_unittests.
    
    Change-Id: I64314dda4838ae611e3643dc0e16eace9cc6fcd9
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2567283Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
    Commit-Queue: Hidehiko Abe <hidehiko@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#832595}
    18c7a65b
shell_surface_util.h 3.3 KB