|
|
c72d21a |
From f0429ee0a57f2cee8ca5e5bfc60fe43152c0f236 Mon Sep 17 00:00:00 2001
|
|
|
c72d21a |
From: Rui Matos <tiagomatos@gmail.com>
|
|
|
c72d21a |
Date: Tue, 25 Oct 2016 19:24:49 +0200
|
|
|
c72d21a |
Subject: [PATCH xserver v2 3/7] xwayland: Transform pointer enter event
|
|
|
c72d21a |
coordinates
|
|
|
c72d21a |
MIME-Version: 1.0
|
|
|
c72d21a |
Content-Type: text/plain; charset=UTF-8
|
|
|
c72d21a |
Content-Transfer-Encoding: 8bit
|
|
|
c72d21a |
|
|
|
c72d21a |
Pointer enter event coordinates are surface relative and we need them
|
|
|
c72d21a |
to be screen relative for pScreen->SetCursorPosition().
|
|
|
c72d21a |
|
|
|
c72d21a |
https://bugzilla.gnome.org/show_bug.cgi?id=758283
|
|
|
c72d21a |
|
|
|
c72d21a |
Signed-off-by: Rui Matos <tiagomatos@gmail.com>
|
|
|
c72d21a |
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
|
|
|
c72d21a |
Reviewed-by: Jonas Ã…dahl <jadahl@gmail.com>
|
|
|
c72d21a |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
c72d21a |
---
|
|
|
c72d21a |
hw/xwayland/xwayland-input.c | 5 ++++-
|
|
|
c72d21a |
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
c72d21a |
|
|
|
c72d21a |
diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c
|
|
|
c72d21a |
index 4d447a5..1991076 100644
|
|
|
c72d21a |
--- a/hw/xwayland/xwayland-input.c
|
|
|
c72d21a |
+++ b/hw/xwayland/xwayland-input.c
|
|
|
c72d21a |
@@ -298,6 +298,7 @@ pointer_handle_enter(void *data, struct wl_pointer *pointer,
|
|
|
c72d21a |
int i;
|
|
|
c72d21a |
int sx = wl_fixed_to_int(sx_w);
|
|
|
c72d21a |
int sy = wl_fixed_to_int(sy_w);
|
|
|
c72d21a |
+ int dx, dy;
|
|
|
c72d21a |
ScreenPtr pScreen = xwl_seat->xwl_screen->screen;
|
|
|
c72d21a |
ValuatorMask mask;
|
|
|
c72d21a |
|
|
|
c72d21a |
@@ -314,9 +315,11 @@ pointer_handle_enter(void *data, struct wl_pointer *pointer,
|
|
|
c72d21a |
xwl_seat->pointer_enter_serial = serial;
|
|
|
c72d21a |
|
|
|
c72d21a |
xwl_seat->focus_window = wl_surface_get_user_data(surface);
|
|
|
c72d21a |
+ dx = xwl_seat->focus_window->window->drawable.x;
|
|
|
c72d21a |
+ dy = xwl_seat->focus_window->window->drawable.y;
|
|
|
c72d21a |
|
|
|
c72d21a |
master = GetMaster(dev, POINTER_OR_FLOAT);
|
|
|
c72d21a |
- (*pScreen->SetCursorPosition) (dev, pScreen, sx, sy, TRUE);
|
|
|
c72d21a |
+ (*pScreen->SetCursorPosition) (dev, pScreen, dx + sx, dy + sy, TRUE);
|
|
|
c72d21a |
|
|
|
c72d21a |
miPointerInvalidateSprite(master);
|
|
|
c72d21a |
|
|
|
c72d21a |
--
|
|
|
c72d21a |
2.9.3
|
|
|
c72d21a |
|