clutter: Drop clutter_input_device_get_associated_device()

And the private setter. One may ask the seat for the pointer/keyboard
instead of asking the device for its counterpart.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1403>
This commit is contained in:
Carlos Garnacho
2020-11-18 17:51:48 +01:00
committed by Marge Bot
parent c4fa5ef88a
commit be9c531ab9
5 changed files with 4 additions and 165 deletions

View File

@ -1510,7 +1510,7 @@ evdev_add_device (MetaSeatImpl *seat_impl,
struct libinput_device *libinput_device)
{
ClutterInputDeviceType type;
ClutterInputDevice *device, *master = NULL;
ClutterInputDevice *device;
gboolean is_touchscreen, is_tablet_switch;
device = meta_input_device_native_new (seat_impl, libinput_device);
@ -1521,14 +1521,6 @@ evdev_add_device (MetaSeatImpl *seat_impl,
* ClutterInputDevice API */
type = meta_input_device_native_determine_type (libinput_device);
if (type == CLUTTER_KEYBOARD_DEVICE)
master = seat_impl->core_keyboard;
else if (type == CLUTTER_POINTER_DEVICE)
master = seat_impl->core_pointer;
if (master)
_clutter_input_device_set_associated_device (device, master);
is_touchscreen = type == CLUTTER_TOUCHSCREEN_DEVICE;
is_tablet_switch =
device_is_tablet_switch (META_INPUT_DEVICE_NATIVE (device));