Description
Issue №2390 opened by mcpalmer1980 at 2020-12-09 22:16:43
Calling mouse.set_grab(True) and event.set_grab(True) doesn't enter virtual mouse mode when using sdl2.video
I assume this stems from using video.Window() instead of display.set_mode()
Also, a very small issue, you can set texture.color with a tuple, but you need to use a color object to set image.color.
Comments
# # mcpalmer1980 commented at 2020-12-12 14:28:34
I agree that my fix was less than ideal. But pg_GetDefaultWindow() doesn't return a video.Window and I have no idea how to fix that. Since the _sdl2 API is experimental I thought it best to add this hack there instead of messing with the official pygame stuff. Also, there is some sense in it being in Window because it effects how input is received in relation to the window.
When a final sdl2.video API is released, pg_GetDefaultWindow() will probably return the active video.window (if there still is one) and the problem will have fixed itself. Admittedly, I really like the experimental sdl2 API how it stands.