[mutter/gnome-3-24] wayland: Base tablet tool coordinates on the current event
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gnome-3-24] wayland: Base tablet tool coordinates on the current event
- Date: Mon, 3 Jul 2017 12:32:05 +0000 (UTC)
commit a150225a598ea4e33bbfcabbd6568c421bc3eb19
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Jun 30 14:06:26 2017 +0200
wayland: Base tablet tool coordinates on the current event
Instead of the last device position. This was copied a little bit too
straight from MetaWaylandPointer.
https://bugzilla.gnome.org/show_bug.cgi?id=783535
src/wayland/meta-wayland-tablet-tool.c | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/src/wayland/meta-wayland-tablet-tool.c b/src/wayland/meta-wayland-tablet-tool.c
index 4cd865f..6c19352 100644
--- a/src/wayland/meta-wayland-tablet-tool.c
+++ b/src/wayland/meta-wayland-tablet-tool.c
@@ -621,17 +621,16 @@ repick_for_event (MetaWaylandTabletTool *tool,
static void
meta_wayland_tablet_tool_get_relative_coordinates (MetaWaylandTabletTool *tool,
- ClutterInputDevice *device,
+ const ClutterEvent *event,
MetaWaylandSurface *surface,
wl_fixed_t *sx,
wl_fixed_t *sy)
{
- float xf = 0.0f, yf = 0.0f;
- ClutterPoint pos;
+ float xf, yf;
- clutter_input_device_get_coords (device, NULL, &pos);
+ clutter_event_get_coords (event, &xf, &yf);
clutter_actor_transform_stage_point (CLUTTER_ACTOR (meta_surface_actor_get_texture
(surface->surface_actor)),
- pos.x, pos.y, &xf, &yf);
+ xf, yf, &xf, &yf);
*sx = wl_fixed_from_double (xf) / surface->scale;
*sy = wl_fixed_from_double (yf) / surface->scale;
@@ -642,11 +641,9 @@ broadcast_motion (MetaWaylandTabletTool *tool,
const ClutterEvent *event)
{
struct wl_resource *resource;
- ClutterInputDevice *device;
wl_fixed_t sx, sy;
- device = clutter_event_get_source_device (event);
- meta_wayland_tablet_tool_get_relative_coordinates (tool, device,
+ meta_wayland_tablet_tool_get_relative_coordinates (tool, event,
tool->focus_surface,
&sx, &sy);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]