blob: 53ac976a46eda5589a8037478498c4bfb8bfd1f4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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 );
}
|