Sending a button press event for a second pointing device
问题 So I want to make left mouse clicks using another pointing device (that can be created with e.g. xinput create-master mouse ) but those clicks shouldn't give focus to windows. This is what I got so far: (Compile this code with gcc -lX11 -lXtst -lXext -o test test.c and move your mouse over e.g. text that is inside of a text editor like Kate) #include <X11/Xlib.h> // Simulate mouse click void click (Display *display, int button) { // Create and setting up the event XEvent event; event.xbutton