From d36adf52a2b2711d22b11105f7bd907d4493fb9b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 12 Jan 2009 15:29:36 +1000 Subject: dix: fix WarpPointer calls for devices with custom valuator ranges (#19297) If the MD's lastSlave was a devices with custom axes ranges, then a WarpPointer would position the cursor at the wrong location. A WarpPointer request provides screen coordinates and these coordinates were scaled to the device range before warping. This patch consists of two parts: 1) in the WarpPointer handling, get the lastSlave and post the event through this device. 2) assume that WarpPointer coordinates are always in screen coordinates and scale them to device coordinates in GPE before continuing. Note that this breaks device-coordinate based XWarpDevicePointer calls (for which the spec isn't nailed down yet anyway) until a better solution is found. X.Org Bug 19297 Signed-off-by: Peter Hutterer --- mi/mipointer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mi/mipointer.c') diff --git a/mi/mipointer.c b/mi/mipointer.c index 83a355ea3..567790c49 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -576,7 +576,7 @@ miPointerMove (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) } } - nevents = GetPointerEvents(events, pDev, MotionNotify, 0, POINTER_ABSOLUTE, 0, 2, valuators); + nevents = GetPointerEvents(events, pDev, MotionNotify, 0, POINTER_SCREEN | POINTER_ABSOLUTE, 0, 2, valuators); OsBlockSignals(); #ifdef XQUARTZ -- cgit v1.2.3