diff options
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 ); +} |
