Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
May 23, 2024

Conversation

ankith26
Copy link
Member

Reverts the hacky test fix applied in #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.

@ankith26 ankith26 requested a review from a team as a code owner May 21, 2024 18:48
Copy link
Member

@MyreMylar MyreMylar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets hope this is second time lucky 👍

Copy link
Member

@oddbookworm oddbookworm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully this fixes that pesky intermittent fail

@oddbookworm oddbookworm added this to the 2.5.0 milestone May 23, 2024
@oddbookworm oddbookworm merged commit 4c5b9d5 into main May 23, 2024
39 checks passed
@ankith26 ankith26 deleted the ankith26-fix-window-size branch May 23, 2024 05:08
@robertpfeiffer
Copy link
Contributor

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
Copy link
Member Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants