mirror of
https://github.com/brl/mutter.git
synced 2024-11-12 17:27:03 -05:00
clutter: Drop internal update_from_tool() vmethod
This is kinda pointless now, and will be made completely unneeded by dropping device axes. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1403>
This commit is contained in:
parent
168ceb9905
commit
5689a843c7
@ -133,9 +133,6 @@ struct _ClutterInputDevice
|
||||
ClutterPtrA11yData *ptr_a11y_data;
|
||||
};
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void clutter_input_device_update_from_tool (ClutterInputDevice *device,
|
||||
ClutterInputDeviceTool *tool);
|
||||
CLUTTER_EXPORT
|
||||
ClutterActor * clutter_input_device_update (ClutterInputDevice *device,
|
||||
ClutterEventSequence *sequence,
|
||||
|
@ -1561,20 +1561,6 @@ clutter_input_device_lookup_tool (ClutterInputDevice *device,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
clutter_input_device_update_from_tool (ClutterInputDevice *device,
|
||||
ClutterInputDeviceTool *tool)
|
||||
{
|
||||
ClutterInputDeviceClass *device_class;
|
||||
|
||||
g_return_if_fail (CLUTTER_IS_INPUT_DEVICE (device));
|
||||
|
||||
device_class = CLUTTER_INPUT_DEVICE_GET_CLASS (device);
|
||||
|
||||
if (device_class->update_from_tool)
|
||||
device_class->update_from_tool (device, tool);
|
||||
}
|
||||
|
||||
gint
|
||||
clutter_input_device_get_n_rings (ClutterInputDevice *device)
|
||||
{
|
||||
|
@ -44,8 +44,6 @@ struct _ClutterInputDeviceClass
|
||||
gboolean (* keycode_to_evdev) (ClutterInputDevice *device,
|
||||
guint hardware_keycode,
|
||||
guint *evdev_keycode);
|
||||
void (* update_from_tool) (ClutterInputDevice *device,
|
||||
ClutterInputDeviceTool *tool);
|
||||
|
||||
gboolean (* is_mode_switch_button) (ClutterInputDevice *device,
|
||||
guint group,
|
||||
|
@ -133,45 +133,6 @@ meta_input_device_native_keycode_to_evdev (ClutterInputDevice *device,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
meta_input_device_native_update_from_tool (ClutterInputDevice *device,
|
||||
ClutterInputDeviceTool *tool)
|
||||
{
|
||||
MetaInputDeviceToolNative *evdev_tool;
|
||||
|
||||
evdev_tool = META_INPUT_DEVICE_TOOL_NATIVE (tool);
|
||||
|
||||
g_object_freeze_notify (G_OBJECT (device));
|
||||
|
||||
_clutter_input_device_reset_axes (device);
|
||||
|
||||
_clutter_input_device_add_axis (device, CLUTTER_INPUT_AXIS_X, 0, 0, 0);
|
||||
_clutter_input_device_add_axis (device, CLUTTER_INPUT_AXIS_Y, 0, 0, 0);
|
||||
|
||||
if (libinput_tablet_tool_has_distance (evdev_tool->tool))
|
||||
_clutter_input_device_add_axis (device, CLUTTER_INPUT_AXIS_DISTANCE, 0, 1, 0);
|
||||
|
||||
if (libinput_tablet_tool_has_pressure (evdev_tool->tool))
|
||||
_clutter_input_device_add_axis (device, CLUTTER_INPUT_AXIS_PRESSURE, 0, 1, 0);
|
||||
|
||||
if (libinput_tablet_tool_has_tilt (evdev_tool->tool))
|
||||
{
|
||||
_clutter_input_device_add_axis (device, CLUTTER_INPUT_AXIS_XTILT, -90, 90, 0);
|
||||
_clutter_input_device_add_axis (device, CLUTTER_INPUT_AXIS_YTILT, -90, 90, 0);
|
||||
}
|
||||
|
||||
if (libinput_tablet_tool_has_rotation (evdev_tool->tool))
|
||||
_clutter_input_device_add_axis (device, CLUTTER_INPUT_AXIS_ROTATION, 0, 360, 0);
|
||||
|
||||
if (libinput_tablet_tool_has_slider (evdev_tool->tool))
|
||||
_clutter_input_device_add_axis (device, CLUTTER_INPUT_AXIS_SLIDER, -1, 1, 0);
|
||||
|
||||
if (libinput_tablet_tool_has_wheel (evdev_tool->tool))
|
||||
_clutter_input_device_add_axis (device, CLUTTER_INPUT_AXIS_WHEEL, -180, 180, 0);
|
||||
|
||||
g_object_thaw_notify (G_OBJECT (device));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
meta_input_device_native_is_mode_switch_button (ClutterInputDevice *device,
|
||||
uint32_t group,
|
||||
@ -1243,7 +1204,6 @@ meta_input_device_native_class_init (MetaInputDeviceNativeClass *klass)
|
||||
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->update_from_tool = meta_input_device_native_update_from_tool;
|
||||
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;
|
||||
|
@ -1682,9 +1682,6 @@ input_device_update_tool (MetaSeatImpl *seat_impl,
|
||||
|
||||
if (evdev_device->last_tool != tool)
|
||||
{
|
||||
if (tool)
|
||||
clutter_input_device_update_from_tool (input_device, tool);
|
||||
|
||||
evdev_device->last_tool = tool;
|
||||
input_settings = seat_impl->input_settings;
|
||||
meta_input_settings_notify_tool_change (input_settings, input_device, tool);
|
||||
|
@ -867,9 +867,6 @@ translate_property_event (MetaSeatX11 *seat_x11,
|
||||
meta_input_device_x11_update_tool (device, tool);
|
||||
input_settings = meta_backend_get_input_settings (meta_get_backend ());
|
||||
meta_input_settings_notify_tool_change (input_settings, device, tool);
|
||||
|
||||
if (tool)
|
||||
clutter_input_device_update_from_tool (device, tool);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user