[mutter/wip/tablet-protocol-v2: 126/149] wayland: Apply pressure settings before sending wp_tablet_tool.pressure
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/tablet-protocol-v2: 126/149] wayland: Apply pressure settings before sending wp_tablet_tool.pressure
- Date: Wed, 20 Jul 2016 17:44:05 +0000 (UTC)
commit 499851d40454a3ad91bdd4e6537dce5a565de203
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Jun 22 16:04:11 2016 +0200
wayland: Apply pressure settings before sending wp_tablet_tool.pressure
src/wayland/meta-wayland-tablet-tool.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/src/wayland/meta-wayland-tablet-tool.c b/src/wayland/meta-wayland-tablet-tool.c
index 9058686..cb622c4 100644
--- a/src/wayland/meta-wayland-tablet-tool.c
+++ b/src/wayland/meta-wayland-tablet-tool.c
@@ -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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]