clutter: Prepare input focus for IM event delivery

The clutter_input_focus_filter_key_event() function has been made
a more generic filter_event(). Besides its old role about letting
key events go through the IM, it will also process the IM events
that are possibly injected as a result.

Users have been updated to these changes.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1286
This commit is contained in:
Carlos Garnacho
2020-02-17 11:25:14 +01:00
committed by Robert Mader
parent d3b845902e
commit fb6ff75a97
6 changed files with 63 additions and 11 deletions

View File

@ -414,6 +414,16 @@ meta_wayland_seat_handle_event (MetaWaylandSeat *seat,
if (meta_wayland_seat_has_touch (seat))
return meta_wayland_touch_handle_event (seat->touch, event);
break;
case CLUTTER_IM_COMMIT:
case CLUTTER_IM_DELETE:
case CLUTTER_IM_PREEDIT:
if (meta_wayland_text_input_handle_event (seat->text_input, event))
return TRUE;
if (meta_wayland_gtk_text_input_handle_event (seat->gtk_text_input,
event))
return TRUE;
break;
default:
break;

View File

@ -629,6 +629,5 @@ meta_wayland_gtk_text_input_handle_event (MetaWaylandGtkTextInput *text_input,
!clutter_input_focus_is_focused (text_input->input_focus))
return FALSE;
return clutter_input_focus_filter_key_event (text_input->input_focus,
(const ClutterKeyEvent *) event);
return clutter_input_focus_filter_event (text_input->input_focus, event);
}

View File

@ -737,6 +737,5 @@ meta_wayland_text_input_handle_event (MetaWaylandTextInput *text_input,
!clutter_input_focus_is_focused (text_input->input_focus))
return FALSE;
return clutter_input_focus_filter_key_event (text_input->input_focus,
(const ClutterKeyEvent *) event);
return clutter_input_focus_filter_event (text_input->input_focus, event);
}