pygame-community / pygame-ce

🐍🎮 pygame - Community Edition is a FOSS Python library for multimedia applications (like games). Built on top of the excellent SDL library.
https://pyga.me
767 stars 120 forks source link

Force window surface update after set_size, hopefully proper fix for that pesky frequent pypy test fail #2865

Closed ankith26 closed 1 month ago

ankith26 commented 1 month ago

Reverts the hacky test fix applied in https://github.com/pygame-community/pygame-ce/pull/2832 that didn't work out

This new approach essentially forces the update via SDL_GetWindowSurface to happen immediately, so we are now ensuring that the window surface is updated before we even leave the function call.

robertpfeiffer commented 1 month ago

is this really how we want to to things? I added this behaviour to pygame.display as a hack to keep backward compat with pygame 1.9, which required a call to set_mode after a VIDEORESIZE event.

ankith26 commented 1 month ago

There is absolutely no behaviour change happening here. All it does is add an extra call to SDL_GetWindowSurface that runs before the one in the event watch runs (and when that runs again, there is no harm there)

Did you mean to comment this on another issue?