backends/native: Proxy modifier state changes via MetaSeatImpl

This changes within the MetaSeatImpl realm, so use a signal to forward
this to the MetaSeatNative/MetaKeymapNative one.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1403>
This commit is contained in:
Carlos Garnacho
2020-08-11 17:38:32 +02:00
committed by Marge Bot
parent be1ffc86ca
commit 89a140d618
2 changed files with 20 additions and 1 deletions

View File

@ -140,6 +140,16 @@ proxy_bell (MetaSeatImpl *seat_impl,
clutter_seat_bell_notify (CLUTTER_SEAT (seat_native));
}
static void
proxy_mods_state_changed (MetaSeatImpl *seat_impl,
ClutterSeat *seat)
{
ClutterKeymap *keymap;
keymap = clutter_seat_get_keymap (seat);
g_signal_emit_by_name (keymap, "state-changed");
}
static void
meta_seat_native_constructed (GObject *object)
{
@ -154,6 +164,8 @@ meta_seat_native_constructed (GObject *object)
G_CALLBACK (proxy_touch_mode_changed), seat);
g_signal_connect (seat->impl, "bell",
G_CALLBACK (proxy_bell), seat);
g_signal_connect (seat->impl, "mods-state-changed",
G_CALLBACK (proxy_mods_state_changed), seat);
seat->core_pointer = meta_seat_impl_get_pointer (seat->impl);
seat->core_keyboard = meta_seat_impl_get_keyboard (seat->impl);