[PATCH] dix: Add a Screen method for additional cursor confinement
Adam Jackson
ajax at redhat.com
Wed Jan 5 09:05:34 PST 2011
This just reserves the slot in the ABI and adds the call to position
updates. Confining cursors to CRTCs will come soon.
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
include/scrnintstr.h | 4 ++++
mi/mipointer.c | 3 +++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/include/scrnintstr.h b/include/scrnintstr.h
index 00d014c..2635d99 100644
--- a/include/scrnintstr.h
+++ b/include/scrnintstr.h
@@ -402,6 +402,9 @@ typedef void (* DeviceCursorCleanupProcPtr)(
DeviceIntPtr /* pDev */,
ScreenPtr /* pScreen */);
+typedef void (*ConstrainCursorHarderProcPtr)(
+ DeviceIntPtr, ScreenPtr, int *, int *);
+
typedef struct _Screen {
int myNum; /* index of this instance in Screens[] */
ATOM id;
@@ -468,6 +471,7 @@ typedef struct _Screen {
/* Cursor Procedures */
ConstrainCursorProcPtr ConstrainCursor;
+ ConstrainCursorHarderProcPtr ConstrainCursorHarder;
CursorLimitsProcPtr CursorLimits;
DisplayCursorProcPtr DisplayCursor;
RealizeCursorProcPtr RealizeCursor;
diff --git a/mi/mipointer.c b/mi/mipointer.c
index 554397a..9bfabb7 100644
--- a/mi/mipointer.c
+++ b/mi/mipointer.c
@@ -529,6 +529,9 @@ miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y)
if (*y >= pPointer->limits.y2)
*y = pPointer->limits.y2 - 1;
+ if (pScreen->ConstrainCursorHarder)
+ pScreen->ConstrainCursorHarder(pDev, pScreen, x, y);
+
if (pPointer->x == *x && pPointer->y == *y &&
pPointer->pScreen == pScreen)
return;
--
1.7.3.4
More information about the xorg-devel
mailing list