From e59ccf0d7dae64fda74231b5ac7776fe331d0b2b Mon Sep 17 00:00:00 2001 From: aura Date: Mon, 23 Feb 2026 10:40:08 +0100 Subject: push code --- .gitignore | 1 + Makefile | 2 ++ nocursor.c | 24 ++++++++++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 nocursor.c diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..662ec9d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +nocursor.so diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0b6504e --- /dev/null +++ b/Makefile @@ -0,0 +1,2 @@ +all: + clang -shared -fPIC nocursor.c -o nocursor.so -ldl 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 +#include +#include + +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 ); +} -- cgit v1.2.3