mirror of
https://github.com/brl/mutter.git
synced 2025-02-16 13:24:09 +00:00
wayland: Apply pressure settings before sending wp_tablet_tool.pressure
This commit is contained in:
parent
ef113d708b
commit
499851d404
@ -742,6 +742,22 @@ broadcast_axis (MetaWaylandTabletTool *tool,
|
||||
if (!clutter_input_device_get_axis_value (source, event->motion.axes, axis, &val))
|
||||
return;
|
||||
|
||||
if (axis == CLUTTER_INPUT_AXIS_PRESSURE)
|
||||
{
|
||||
MetaInputSettings *input_settings;
|
||||
ClutterInputDevice *device;
|
||||
|
||||
input_settings = meta_input_settings_get ();
|
||||
device = clutter_event_get_source_device (event);
|
||||
|
||||
if (input_settings)
|
||||
{
|
||||
val = meta_input_settings_translate_tablet_tool_pressure (input_settings,
|
||||
tool->device_tool,
|
||||
device, val);
|
||||
}
|
||||
}
|
||||
|
||||
value = val * TABLET_AXIS_MAX;
|
||||
|
||||
wl_resource_for_each (resource, &tool->focus_resource_list)
|
||||
|
Loading…
x
Reference in New Issue
Block a user