Skip to content

Commit 684d756

Browse files
committed
Force window surface refresh on set_size
1 parent 89f9848 commit 684d756

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src_c/window.c

+5
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,11 @@ window_set_size(pgWindowObject *self, PyObject *arg, void *v)
570570
}
571571

572572
SDL_SetWindowSize(self->_win, w, h);
573+
if (self->surf) {
574+
/* Ensure that the underlying surf is immediately updated, instead of
575+
* relying on the event callback */
576+
self->surf->surf = SDL_GetWindowSurface(self->_win);
577+
}
573578

574579
return 0;
575580
}

0 commit comments

Comments
 (0)