Open lordmauve opened 4 years ago
Personally I would give it a better name. In a sea of mouse.* functions in the docs, searching for the word "grab" never occurred to me.
On a recent project, I found set_grab() literally by figuring out the Windows / Cocoa functions for mouse-window exclusivity, then grepping the SDL sources to see who called those, then grepping the PyGame sources to see who called the relevant bits of SDL.
Pygame has a method
pygame.event.set_grab()
which grabs exclusive use of the input.We could wrap wrap this but also ensure Escape (or something) releases the exclusivity, and show a message on a custom layer to explain how to exit (like how full screen works in a browser).