wayland: Let IM events go through

These paths implicitly relied on the forwarded IM key events having
a source_device backed by a real HW device. This assumption is no
longer held true since commit b5328c977.

Explicitly check the INPUT_METHOD flag so they are handled as they
should despite not being "real HW" events.
This commit is contained in:
Carlos Garnacho 2018-04-24 14:22:03 +02:00
parent 59397266ed
commit 928a40f328

View File

@ -325,7 +325,8 @@ void
meta_wayland_seat_update (MetaWaylandSeat *seat, meta_wayland_seat_update (MetaWaylandSeat *seat,
const ClutterEvent *event) const ClutterEvent *event)
{ {
if (!event_from_supported_hardware_device (seat, event) && if (!(clutter_event_get_flags (event) & CLUTTER_EVENT_FLAG_INPUT_METHOD) &&
!event_from_supported_hardware_device (seat, event) &&
!event_is_synthesized_crossing (event)) !event_is_synthesized_crossing (event))
return; return;
@ -363,7 +364,8 @@ gboolean
meta_wayland_seat_handle_event (MetaWaylandSeat *seat, meta_wayland_seat_handle_event (MetaWaylandSeat *seat,
const ClutterEvent *event) const ClutterEvent *event)
{ {
if (!event_from_supported_hardware_device (seat, event)) if (!(clutter_event_get_flags (event) & CLUTTER_EVENT_FLAG_INPUT_METHOD) &&
!event_from_supported_hardware_device (seat, event))
return FALSE; return FALSE;
switch (event->type) switch (event->type)