xserver: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Feb 13 23:59:28 UTC 2025


 mi/mipointer.h      |   32 ++++++++++++++++++++++++++++++++
 mi/mipointer_priv.h |    2 --
 2 files changed, 32 insertions(+), 2 deletions(-)

New commits:
commit 6349773d5efd2d2706a21fcd153b0df9cc5afbbb
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Thu Feb 13 13:22:52 2025 +0100

    mi: (re)export and document miPointerInitialize()
    
    Xrdp project request exporting this function again, because (unlike the
    usual xf86-video-* drivers) they need their own custom cursor handling:
    RDP is designed to draw cursors on client side.
    
    Also documenting what the function does.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1787>

diff --git a/mi/mipointer.h b/mi/mipointer.h
index 77426ad9b..ba1710a25 100644
--- a/mi/mipointer.h
+++ b/mi/mipointer.h
@@ -94,4 +94,36 @@ extern _X_EXPORT DevPrivateKeyRec miPointerScreenKeyRec;
 
 #define miPointerScreenKey (&miPointerScreenKeyRec)
 
+/**
+ * @brief initialize pointer cursor with custom handling
+ *
+ * For DDX'es that need their own handling of pointer cursors,
+ * and can't use the generic "soft cursor" that's created via
+ * miDCInitialize().
+ *
+ * That can be the case on certain video HW with it's own sprite support,
+ * or on remote display protocols like RDP, where the client get the cursor
+ * pixmaps sent over the wire and is responsible for painting it on his side.
+ *
+ * Overwrites ScreenPtr vectors:
+ *
+ *     ConstrainCursor, CursorLimits, DisplayCursor, RealizeCursor,
+ *     UnrealizeCursor, SetCursorPosition, RecolorCursor, DeviceCursorCleanup
+ *     DeviceCursorInitialize
+ *
+ * Hooks to ScreenPtr vectors: CloseScreen
+ *
+ * @param pScreen       pointer to ScreenRec the pointer handling applies to
+ * @param spireFuncs    pointer to miPointerSpriteFuncPtr call vectors
+ * @param screenFuncs   pointer to miPointerScreenFuncPtr call vectors
+ * @param waitForUpdate TRUE if MI shouldn't redraw the pointer immediately,
+                        but wait for somebody else triggering it explicitly
+ * @return TRUE on success, FALSE usually indicates allocation failure
+ */
+_X_EXPORT Bool
+miPointerInitialize(ScreenPtr pScreen,
+                    miPointerSpriteFuncPtr spriteFuncs,
+                    miPointerScreenFuncPtr screenFuncs,
+                    Bool waitForUpdate);
+
 #endif                          /* MIPOINTER_H */
diff --git a/mi/mipointer_priv.h b/mi/mipointer_priv.h
index 2fdec1ac3..cc4ce9940 100644
--- a/mi/mipointer_priv.h
+++ b/mi/mipointer_priv.h
@@ -11,8 +11,6 @@
 #include "include/input.h"
 #include "mi/mipointer.h"
 
-Bool miPointerInitialize(ScreenPtr pScreen, miPointerSpriteFuncPtr spriteFuncs,
-                         miPointerScreenFuncPtr screenFuncs, Bool waitForUpdate);
 void miPointerWarpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y);
 void miPointerSetScreen(DeviceIntPtr pDev, int screen_num, int x, int y);
 void miPointerUpdateSprite(DeviceIntPtr pDev);


More information about the xorg-commit mailing list