main: Allow updating device axes from the current tool

This way devices are ensured the proper axis status at the time
of processing the events.
This commit is contained in:
Carlos Garnacho
2015-02-04 17:17:23 +01:00
parent 7004818508
commit eafa04230b
3 changed files with 22 additions and 0 deletions

View File

@@ -2052,3 +2052,17 @@ 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);
}