Is there a way to restrict mouse movement within a certain region in X11?

135 Views Asked by At

I have a C application developed with X/Motif and I would like restrict the mouse movement to stay within certain boundaries, not necessarily the main window itself. I found about the XGrabPointer method, which can confine the pointer to a window, but I want the mouse to be confined to an even smaller rectangle whenever the app is running, for safety reasons. Is there any way to do this?

0

There are 0 best solutions below