• Antonio Gomes's avatar
    [ozone/wayland] use KeyboardEvDev for keyboard handling · 05e053f3
    Antonio Gomes authored
    In WaylandKeyboard::Key's body, we deliberately duplicate some of the
    logic in KeyboardEvdev::DispatchKey. The idea was to use the bits of
    KeyboardEvDev needed for proper keyboard input handling.
    It turns out that features like key repeat and specific cases involving
    modifiers would need more duplication to get working.
    
    Instead of continuing to duplicate stable and existing logic, this CL
    adopts the use of KeyboardEvDev from WaylandKeyboard, fixing these
    issues and being able to do some code clean ups (follow ups).
    
    The CL also changes the KeyboardLayoutManager instantiation order in
    OzonePlatformWayland::InitializeUI, so that it happens prior to
    WaylandConnection instantiation.
    Reason: once WaylandConnection creates WaylandKeyboard and (implicitly)
    KeyboardEvDev, the later needs the KeyboardLayoutEngine properly set.
    
    CL also reset modifiers upon ::Leave, for when alt+tab is supported to
    change window focus (external window mode), where modifiers need to be
    updated accordingly.
    
    Last but not least, WaylandKeyboard::RepeatInfo sends delay and rate
    information that is usefull for KeyboardEvdev. Thus, desired repeating
    settings can be set. What is more, wayland documentation says if
    rate is send as 0, then auto repeat should be turned off.
    
    BUG=578890
    
    Change-Id: I8ca392da7b10ba6c62f703e1e4b571c1e3d310a1
    Reviewed-on: https://chromium-review.googlesource.com/822871
    Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
    Reviewed-by: default avatarRobert Kroeger <rjkroege@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#523750}
    05e053f3
BUILD.gn 2.69 KB