clutter: Drop keycode_to_evdev vmethod

This is just used in the native backend, move it to an utility
function there.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1403>
This commit is contained in:
Carlos Garnacho
2020-11-19 12:21:26 +01:00
committed by Marge Bot
parent c7f989c1e2
commit 71b4c0ee02
8 changed files with 13 additions and 76 deletions

View File

@ -120,19 +120,6 @@ meta_input_device_native_get_property (GObject *object,
}
}
static gboolean
meta_input_device_native_keycode_to_evdev (ClutterInputDevice *device,
uint32_t hardware_keycode,
uint32_t *evdev_keycode)
{
/* The hardware keycodes from the evdev backend are almost evdev
keycodes: we use the evdev keycode file, but xkb rules have an
offset by 8. See the comment in _clutter_key_event_new_from_evdev()
*/
*evdev_keycode = hardware_keycode - 8;
return TRUE;
}
static gboolean
meta_input_device_native_is_mode_switch_button (ClutterInputDevice *device,
uint32_t group,
@ -1203,7 +1190,6 @@ meta_input_device_native_class_init (MetaInputDeviceNativeClass *klass)
object_class->set_property = meta_input_device_native_set_property;
object_class->get_property = meta_input_device_native_get_property;
device_manager_class->keycode_to_evdev = meta_input_device_native_keycode_to_evdev;
device_manager_class->is_mode_switch_button = meta_input_device_native_is_mode_switch_button;
device_manager_class->get_group_n_modes = meta_input_device_native_get_group_n_modes;
device_manager_class->is_grouped = meta_input_device_native_is_grouped;