# Phase 9 — Cursor Rendering --- ## Step 9.1 — Render the cursor in the compositor Since compositing may obscure the hardware cursor in certain configurations, render it ourselves: 1. Call `XFixesGetCursorImage(dpy)` to get the current cursor bitmap (ARGB pixel data, width, height, hotspot). 2. Convert to a raylib `Texture2D`. 3. Draw it at the pointer position each frame (query with `XQueryPointer()`). 4. Optionally call `XFixesHideCursor()` on the root and draw our own cursor exclusively. Subscribe to cursor change notifications: ```c XFixesSelectCursorInput(dpy, root, XFixesDisplayCursorNotifyMask); ``` Cache the cursor texture and only update it when an `XFixesCursorNotify` event fires (cursor shape changed — e.g., from arrow to text beam when hovering over `xterm`). **Verify:** The cursor is visible and correct when moving over composited windows. Cursor changes (e.g., text cursor in xterm, resize arrows at window edges) are reflected. No flickering or offset.