From 45e2555988bfb69a10c5af6ce59cfaf4b894f66e Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 13 Feb 2025 20:31:50 -0700 Subject: [PATCH] macOS/YDK: when a full-draw is needed, use the GdkQuartzView bounds as the rect, not the drawRect:rect --- libs/tk/ydk/quartz/GdkQuartzView.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/tk/ydk/quartz/GdkQuartzView.c b/libs/tk/ydk/quartz/GdkQuartzView.c index 2e04c7e776..44e607ed36 100644 --- a/libs/tk/ydk/quartz/GdkQuartzView.c +++ b/libs/tk/ydk/quartz/GdkQuartzView.c @@ -707,6 +707,7 @@ static int showInvalidation = 0; CGContextRef cg; double r, g, b; #endif + NSRect bo = [self bounds]; if (GDK_WINDOW_DESTROYED (gdk_window)) return; @@ -726,7 +727,7 @@ static int showInvalidation = 0; * window will remain undrawn. */ - if (NSContainsRect (rect, [self bounds])) { + if (NSContainsRect (rect, bo)) { full_draw = TRUE; #ifndef NDEBUG printf ("full draw seen!\n"); @@ -762,7 +763,7 @@ static int showInvalidation = 0; } if (full_draw) { - GdkRectangle r = { rect.origin.x, rect.origin.y, rect.size.width, rect.size.height }; + GdkRectangle r = { bo.origin.x, bo.origin.y, bo.size.width, bo.size.height }; region = gdk_region_rectangle (&r); if (impl->needs_display_region) { gdk_region_destroy (impl->needs_display_region);