From 2da45bd9cac442d25dce1fec7bc60b1968d92155 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Fri, 23 May 2025 14:23:36 +0200 Subject: [PATCH] dix: unexport and document ConfineToShape() Not used by any drivers, so no need to keep it exported. Signed-off-by: Enrico Weigelt, metux IT consult --- Xi/xiwarppointer.c | 1 + dix/input_priv.h | 15 +++++++++++++++ include/dix.h | 6 ------ 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/Xi/xiwarppointer.c b/Xi/xiwarppointer.c index f4e08abdf..c6323dd75 100644 --- a/Xi/xiwarppointer.c +++ b/Xi/xiwarppointer.c @@ -38,6 +38,7 @@ #include "dix/cursor_priv.h" #include "dix/dix_priv.h" +#include "dix/input_priv.h" #include "mi/mipointer_priv.h" #include "inputstr.h" /* DeviceIntPtr */ diff --git a/dix/input_priv.h b/dix/input_priv.h index 5b42a39f6..64ef9372b 100644 --- a/dix/input_priv.h +++ b/dix/input_priv.h @@ -371,4 +371,19 @@ int InputThreadUnregisterDev(int fd); CursorPtr InputDevGetSpriteCursor(DeviceIntPtr pDev) _X_ATTRIBUTE_NONNULL_ARG(1); +/* + * @brief confine cursor position to specific region + * + * this is used eg. when a cursor position should be moved, but the cursor + * is constrained to specific region. it moves the position so it fits + * into the region. + * + * @param pDev pointer to device (unused) + * @param region pointer to the constraining region + * @param px in/out buffer for X position + * @param py in/out buffer for Y position + */ +void ConfineToShape(DeviceIntPtr pDev, RegionPtr region, int *px, int *py) + _X_ATTRIBUTE_NONNULL_ARG(2,3,4); + #endif /* _XSERVER_INPUT_PRIV_H */ diff --git a/include/dix.h b/include/dix.h index 08f4d77a2..3f39883e1 100644 --- a/include/dix.h +++ b/include/dix.h @@ -237,12 +237,6 @@ SetVendorRelease(int release); /* events.c */ -extern _X_EXPORT void -ConfineToShape(DeviceIntPtr /* pDev */ , - RegionPtr /* shape */ , - int * /* px */ , - int * /* py */ ); - extern _X_EXPORT Bool IsParent(WindowPtr /* maybeparent */ , WindowPtr /* child */ );