summaryrefslogtreecommitdiff
path: root/nocursor.c
diff options
context:
space:
mode:
authoraura <nw@moneybot.cc>2026-02-23 10:40:08 +0100
committeraura <nw@moneybot.cc>2026-02-23 10:40:08 +0100
commite59ccf0d7dae64fda74231b5ac7776fe331d0b2b (patch)
tree674c659a2a837e31d654d0a1d3bd5f551246dd72 /nocursor.c
push code
Diffstat (limited to 'nocursor.c')
-rw-r--r--nocursor.c24
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 );
+}