Skip to content

Instantly share code, notes, and snippets.

@ThomasAdam
Created November 10, 2014 13:48
Show Gist options
  • Save ThomasAdam/5d7d72fe8e1c4d9009b5 to your computer and use it in GitHub Desktop.
Save ThomasAdam/5d7d72fe8e1c4d9009b5 to your computer and use it in GitHub Desktop.
XSelectInput Override
#include <X11/Xlib.h>
#include <X11/Xutil.h>
/* Compile:
*
* Save this file as xsi_override.c, then:
*
* gcc -I /usr/include/X11 -L /usr/X11/lib -lX11 -Wall -fPIC -shared -o \
* xsi_override.so xsi_override.c -ldl
*
*/
/* Running:
*
* LD_PRELOAD=/path/to/xsi_override.so ./some_program
*
*/
int XSelectInput(Display *, Window, long);
int XSelectInput(Display *d, Window w, long mask)
{
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment