Fix mac/Quartz drawRect full exposure

When full-draw is set, use the `rect` passed as argument
to `drawRect` and ignore `drawn_rects` invalidation.

This may fix some missing redraws when switching tabs.
This commit is contained in:
Robin Gareus 2025-01-17 18:24:33 +01:00
parent 4e34c0a0e3
commit 631cda9fc8
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04

View file

@ -759,7 +759,13 @@ static int showInvalidation = 0;
return; return;
} }
if (!impl->needs_display_region || gdk_quartz_get_use_cocoa_invalidation() || full_draw) { if (full_draw) {
GdkRectangle r = { rect.origin.x, rect.origin.y, rect.size.width, rect.size.height };
region = gdk_region_rectangle (&r);
if (impl->needs_display_region) {
gdk_region_destroy (impl->needs_display_region);
}
} else if (!impl->needs_display_region || gdk_quartz_get_use_cocoa_invalidation()) {
gint nrects; gint nrects;
GdkRectangle* rects; GdkRectangle* rects;
[self getRectsBeingDrawn: &drawn_rects count: &count]; [self getRectsBeingDrawn: &drawn_rects count: &count];