diff options
| author | aura <nw@moneybot.cc> | 2026-02-23 10:40:08 +0100 |
|---|---|---|
| committer | aura <nw@moneybot.cc> | 2026-02-23 10:40:08 +0100 |
| commit | e59ccf0d7dae64fda74231b5ac7776fe331d0b2b (patch) | |
| tree | 674c659a2a837e31d654d0a1d3bd5f551246dd72 /nocursor.c | |
push code
Diffstat (limited to 'nocursor.c')
| -rw-r--r-- | nocursor.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/nocursor.c b/nocursor.c new file mode 100644 index 0000000..53ac976 --- /dev/null +++ b/nocursor.c @@ -0,0 +1,24 @@ +#define _GNU_SOURCE +#include <dlfcn.h> +#include <X11/Xlib.h> +#include <stdio.h> + +typedef int (*XDefineCursor_t)( Display*, Window, Cursor ); +typedef void* (*SetCursor_t)( void* ); + +int XDefineCursor( Display* d, Window w, Cursor c ) { + static XDefineCursor_t real = NULL; + if( !real ) + real = dlsym( RTLD_NEXT, "XDefineCursor" ); + + return real( d, w, None ); +} + + +void* SetCursor( void* cursor ) { + static SetCursor_t real = NULL; + if( !real ) + real = dlsym( RTLD_NEXT, "SetCursor" ); + + return real( NULL ); +} |
