Get rid of native event (i.e: XEvent) usage in libgtkui

Get rid of native event (i.e: XEvent) usage when translating ui::KeyEvent into
GdkEvent in GtkUi GdkKeyBindingsHandler and InputMethod context implementation.
Native event usage outside platform code is undesired and blocks changes such
as Aura/X11 => Ozone/X11 migration (e.g: PlatformEvent migration

It is worth noting that aura IME code has been slightly modified to set root
window as Event::target() during the PRE_DISPATCH phase (for some reason
InputMethodContext::DispatchKeyEvent() is called at this phase) so that IME
context implementation is then able to retrieve the X11 Window id, needed by
GdkEvent system.

To be able to retrieve XEvent group field in gtkui code, an Event::Property has
been added and for now is set only for non-ozone X11. Ozone/X11 will be
addressed in a follow-up CL.


Bug: 965991, 987939
Change-Id: I64929d6866c1dfcfddbfe75166a1bad139c2da8d
Commit-Queue: Nick Yamane <>
Reviewed-by: Sadrul Chowdhury <>
Reviewed-by: Thomas Anderson <>
Cr-Commit-Position: refs/heads/master@{#695827}
15 files changed