diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2020-11-18 17:51:48 +0100 |
---|---|---|
committer | Marge Bot <marge-bot@gnome.org> | 2020-11-27 15:14:33 +0000 |
commit | be9c531ab94dfbbe66b691358d8fa62452363e18 (patch) | |
tree | e3064744ec9b3ae92a538dcba1dcf1288f2b1821 /clutter | |
parent | c4fa5ef88a7a7062d3909f0dcc4b951b6149682b (diff) | |
download | mutter-be9c531ab94dfbbe66b691358d8fa62452363e18.tar.gz |
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>
Diffstat (limited to 'clutter')
-rw-r--r-- | clutter/clutter/clutter-input-device-private.h | 6 | ||||
-rw-r--r-- | clutter/clutter/clutter-input-device.c | 70 | ||||
-rw-r--r-- | clutter/clutter/clutter-input-device.h | 3 |
3 files changed, 0 insertions, 79 deletions
diff --git a/clutter/clutter/clutter-input-device-private.h b/clutter/clutter/clutter-input-device-private.h index 6fe519bdb..3c5413764 100644 --- a/clutter/clutter/clutter-input-device-private.h +++ b/clutter/clutter/clutter-input-device-private.h @@ -85,9 +85,6 @@ struct _ClutterInputDevice ClutterBackend *backend; - /* the associated device */ - ClutterInputDevice *associated; - /* the actor underneath the pointer */ ClutterActor *cursor_actor; GHashTable *inv_touch_sequence_actors; @@ -137,9 +134,6 @@ struct _ClutterInputDevice }; CLUTTER_EXPORT -void _clutter_input_device_set_associated_device (ClutterInputDevice *device, - ClutterInputDevice *associated); -CLUTTER_EXPORT void clutter_input_device_update_from_tool (ClutterInputDevice *device, ClutterInputDeviceTool *tool); CLUTTER_EXPORT diff --git a/clutter/clutter/clutter-input-device.c b/clutter/clutter/clutter-input-device.c index 41a941ad9..b8b10fd35 100644 --- a/clutter/clutter/clutter-input-device.c +++ b/clutter/clutter/clutter-input-device.c @@ -94,13 +94,6 @@ clutter_input_device_dispose (GObject *gobject) g_clear_pointer (&device->product_id, g_free); g_clear_pointer (&device->node_path, g_free); - if (device->associated != NULL) - { - _clutter_input_device_set_associated_device (device->associated, NULL); - g_object_unref (device->associated); - device->associated = NULL; - } - if (device->accessibility_virtual_device) g_clear_object (&device->accessibility_virtual_device); @@ -1073,69 +1066,6 @@ _clutter_input_device_remove_event_sequence (ClutterInputDevice *device, } } -/*< internal > - * clutter_input_device_set_associated_device: - * @device: a #ClutterInputDevice - * @associated: (allow-none): a #ClutterInputDevice, or %NULL - * - * Sets the associated device for @device. - * - * This function keeps a reference on the associated device. - */ -void -_clutter_input_device_set_associated_device (ClutterInputDevice *device, - ClutterInputDevice *associated) -{ - if (device->associated == associated) - return; - - if (device->associated != NULL) - g_object_unref (device->associated); - - device->associated = associated; - if (device->associated != NULL) - g_object_ref (device->associated); - - CLUTTER_NOTE (MISC, "Associating device '%s' to device '%s'", - clutter_input_device_get_device_name (device), - device->associated != NULL - ? clutter_input_device_get_device_name (device->associated) - : "(none)"); - - if (device->device_mode != CLUTTER_INPUT_MODE_LOGICAL) - { - if (device->associated != NULL) - device->device_mode = CLUTTER_INPUT_MODE_PHYSICAL; - else - device->device_mode = CLUTTER_INPUT_MODE_FLOATING; - - g_object_notify_by_pspec (G_OBJECT (device), obj_props[PROP_DEVICE_MODE]); - } -} - -/** - * clutter_input_device_get_associated_device: - * @device: a #ClutterInputDevice - * - * Retrieves a pointer to the #ClutterInputDevice that has been - * associated to @device. - * - * If the #ClutterInputDevice:device-mode property of @device is - * set to %CLUTTER_INPUT_MODE_LOGICAL, this function will return - * %NULL. - * - * Return value: (transfer none): a #ClutterInputDevice, or %NULL - * - * Since: 1.6 - */ -ClutterInputDevice * -clutter_input_device_get_associated_device (ClutterInputDevice *device) -{ - g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (device), NULL); - - return device->associated; -} - /** * clutter_input_device_keycode_to_evdev: * @device: A #ClutterInputDevice diff --git a/clutter/clutter/clutter-input-device.h b/clutter/clutter/clutter-input-device.h index 42948f591..8ae53f82d 100644 --- a/clutter/clutter/clutter-input-device.h +++ b/clutter/clutter/clutter-input-device.h @@ -105,9 +105,6 @@ gboolean clutter_input_device_get_axis_value (ClutterInputDev gdouble *value); CLUTTER_EXPORT -ClutterInputDevice * clutter_input_device_get_associated_device (ClutterInputDevice *device); - -CLUTTER_EXPORT void clutter_input_device_grab (ClutterInputDevice *device, ClutterActor *actor); CLUTTER_EXPORT |