macOS/YDK: Fix crash when resizing windows

_gdk_window_process_updates_recurse() may recurse (duh),
and reenter drawRect. So `needs_display_region` needs
to be unset immediately, not at the end of the method.
This commit is contained in:
Robin Gareus
2025-03-16 01:48:53 +01:00
parent c7d307ba65
commit 7f6f3d64f1

View File

@@ -768,6 +768,7 @@ static int showInvalidation = 0;
region = gdk_region_rectangle (&r);
if (impl->needs_display_region) {
gdk_region_destroy (impl->needs_display_region);
impl->needs_display_region = NULL;
}
} else if (!impl->needs_display_region || gdk_quartz_get_use_cocoa_invalidation()) {
gint nrects;