From 6859815ec0500af6915d5bd65c11c0c2552b8de0 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 20 Jun 2016 15:36:52 +0200 Subject: Call pScreen->ConstrainCursorHarder from the position update path Backported from X.org, maybe incomplete, inspired by: commit 810fbfa44626bff9f443ab17c0ad27ff7ae121d7 Author: Adam Jackson Date: Wed Feb 9 17:32:16 2011 -0500 mi: Call pScreen->ConstrainCursorHarder from the position update path v2: Cover more paths, spotted by Daniel Stone. v3: pass down the mode field for movement mode. Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson Signed-off-by: Peter Hutterer Backport to nx-libs: Mike Gabriel --- nx-X11/programs/Xserver/mi/mipointer.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'nx-X11/programs') diff --git a/nx-X11/programs/Xserver/mi/mipointer.c b/nx-X11/programs/Xserver/mi/mipointer.c index 5e086f2a1..0320a5930 100644 --- a/nx-X11/programs/Xserver/mi/mipointer.c +++ b/nx-X11/programs/Xserver/mi/mipointer.c @@ -46,6 +46,7 @@ in this Software without prior written authorization from The Open Group. # include "mipointrst.h" # include "cursorstr.h" # include "dixstruct.h" +# include int miPointerScreenIndex; static unsigned long miPointerGeneration = 0; @@ -224,6 +225,10 @@ miPointerSetCursorPosition(pScreen, x, y, generateEvent) SetupScreen (pScreen); GenerateEvent = generateEvent; + + if (pScreen->ConstrainCursorHarder) + pScreen->ConstrainCursorHarder(pScreen, Absolute, &x, &y); + /* device dependent - must pend signal and call miPointerWarpCursor */ (*pScreenPriv->screenFuncs->WarpCursor) (pScreen, x, y); if (!generateEvent) -- cgit v1.2.3