[PATCH xserver 2/2] xwayland: fix motion coordinates

Tiago Vignatti tiago.vignatti at intel.com
Tue Jul 31 05:46:12 PDT 2012


clients were getting one pixel shifted on each axis.

Signed-off-by: Tiago Vignatti <tiago.vignatti at intel.com>
---
 hw/xfree86/xwayland/xwayland-input.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/xfree86/xwayland/xwayland-input.c b/hw/xfree86/xwayland/xwayland-input.c
index d9f352f..e31fbec 100644
--- a/hw/xfree86/xwayland/xwayland-input.c
+++ b/hw/xfree86/xwayland/xwayland-input.c
@@ -326,8 +326,8 @@ pointer_handle_motion(void *data, struct wl_pointer *pointer,
     if (!xwl_seat->focus_window)
 	return ;
 
-    dx = xwl_seat->focus_window->window->drawable.x;
-    dy = xwl_seat->focus_window->window->drawable.y;
+    dx = xwl_seat->focus_window->window->drawable.x + 1;
+    dy = xwl_seat->focus_window->window->drawable.y + 1;
 
     lx = xf86ScaleAxis(sx + dx, 0xFFFF, 0, xwl_screen->scrninfo->virtualX, 0);
     ly = xf86ScaleAxis(sy + dy, 0xFFFF, 0, xwl_screen->scrninfo->virtualY, 0);
-- 
1.7.9.5



More information about the wayland-devel mailing list