mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
clutter/evdev: Implement togglekeys notification
Notify with a system sound when the modifiers lock state is changed. Closes: https://gitlab.gnome.org/GNOME/mutter/issues/637
This commit is contained in:
parent
36155f72d0
commit
02fc0b4533
@ -1246,6 +1246,13 @@ clutter_input_device_evdev_apply_kbd_a11y_settings (ClutterInputDeviceEvdev *dev
|
||||
device->a11y_flags = settings->controls;
|
||||
}
|
||||
|
||||
void
|
||||
clutter_evdev_a11y_maybe_notify_toggle_keys (ClutterInputDeviceEvdev *device)
|
||||
{
|
||||
if (device->a11y_flags & CLUTTER_A11Y_TOGGLE_KEYS_ENABLED)
|
||||
clutter_input_device_evdev_bell_notify ();
|
||||
}
|
||||
|
||||
static void
|
||||
release_device_touch_slot (gpointer value)
|
||||
{
|
||||
|
@ -150,6 +150,7 @@ void clutter_input_device_evdev_release_touch_state (Clutte
|
||||
void clutter_input_device_evdev_release_touch_slots (ClutterInputDeviceEvdev *device_evdev,
|
||||
uint64_t time_us);
|
||||
|
||||
void clutter_evdev_a11y_maybe_notify_toggle_keys (ClutterInputDeviceEvdev *);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@ -326,6 +326,7 @@ clutter_seat_evdev_notify_key (ClutterSeatEvdev *seat,
|
||||
backend = clutter_get_default_backend ();
|
||||
g_signal_emit_by_name (clutter_backend_get_keymap (backend), "state-changed");
|
||||
clutter_seat_evdev_sync_leds (seat);
|
||||
clutter_evdev_a11y_maybe_notify_toggle_keys (CLUTTER_INPUT_DEVICE_EVDEV (seat->core_keyboard));
|
||||
}
|
||||
|
||||
if (state == 0 || /* key release */
|
||||
|
Loading…
Reference in New Issue
Block a user