Block a user
UI: Linux & Mac Support for Eyedropper Outside Blender
I'm not a developer, but on X11 it may be worth looking at the source for the xfce4-screenshooter (or similar) application, which certainly registers mouse events outside of the application window…