[PATCH xserver 01/12] dix: Introduce CursorWarpedTo vfunc in Screen
Jonas Ådahl
jadahl at gmail.com
Thu Sep 8 10:46:30 UTC 2016
This new vfunc will be called, if set, after a client has issued a
WarpPointer request. This is necessary for implementing pointer warp
emulation in Xwayland.
Signed-off-by: Jonas Ådahl <jadahl at gmail.com>
---
dix/events.c | 3 +++
include/scrnintstr.h | 9 +++++++++
2 files changed, 12 insertions(+)
diff --git a/dix/events.c b/dix/events.c
index 6610b91..87f080e 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -3609,6 +3609,9 @@ ProcWarpPointer(ClientPtr client)
else if (!PointerConfinedToScreen(dev)) {
NewCurrentScreen(dev, newScreen, x, y);
}
+ if (*newScreen->CursorWarpedTo)
+ (*newScreen->CursorWarpedTo) (dev, newScreen, client,
+ dest, pSprite, x, y);
return Success;
}
diff --git a/include/scrnintstr.h b/include/scrnintstr.h
index 5330714..b3228f8 100644
--- a/include/scrnintstr.h
+++ b/include/scrnintstr.h
@@ -233,6 +233,14 @@ typedef Bool (*SetCursorPositionProcPtr) (DeviceIntPtr /* pDev */ ,
int /*y */ ,
Bool /*generateEvent */ );
+typedef void (*CursorWarpedToProcPtr) (DeviceIntPtr /* pDev */ ,
+ ScreenPtr /*pScreen */ ,
+ ClientPtr /*pClient */ ,
+ WindowPtr /*pWindow */ ,
+ SpritePtr /*pSprite */ ,
+ int /*x */ ,
+ int /*y */ );
+
typedef Bool (*CreateGCProcPtr) (GCPtr /*pGC */ );
typedef Bool (*CreateColormapProcPtr) (ColormapPtr /*pColormap */ );
@@ -536,6 +544,7 @@ typedef struct _Screen {
UnrealizeCursorProcPtr UnrealizeCursor;
RecolorCursorProcPtr RecolorCursor;
SetCursorPositionProcPtr SetCursorPosition;
+ CursorWarpedToProcPtr CursorWarpedTo;
/* GC procedures */
--
2.7.4
More information about the xorg-devel
mailing list