I want to control the mouse pointer in my own window and not out of it. How could I do? Is there any functions to implement it?
By now, I find that perhaps I could use the leave-notify-event to detect the mouse pointer is leaving the window, but how to restrict it to the right x/y position of the window?