• Nick Diego Yamane's avatar
    x11, ozone: Extract DomKey at key event construction · 5ab84908
    Nick Diego Yamane authored
    So far, KeyEvent's DomKey extraction used to happen lazily at
    GetDomKey()/GetCharacter() calls. Such approach assumes native_event()
    is available and holds the underlying XEvent instance so it is able to
    extract event info straight out of it.
    
    Document [1] details the effort to eliminate native event usage outside
    platform code so that it is possible to migrate Aura/X11's PlatformEvent
    away from XEvent* to ui::Event instead (part of broader X11 migration to
    Ozone). This issue addressed in this CL is one those remaining cases
    listed in doc [1].
    
    CL modifies it to extract DomKey value at KeyEvent construction as it is
    done in most Ozone backends (e.g: ozone/evdev). Additionally this
    modifies X11EventSourceDefault, currently used by Ozone/X11, to do the
    same.
    
    [1] https://docs.google.com/document/d/1Neh2p6f8pew9SPuEAtnJMafozAY7uhAIfhwd43CLETc
    
    Bug: 987939
    Change-Id: I9dddad2359b1c345fcb98dabce4506c677269b94
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1813417
    Commit-Queue: Nick Yamane <nickdiego@igalia.com>
    Reviewed-by: default avatarSadrul Chowdhury <sadrul@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#698675}
    5ab84908
event.cc 40 KB