From ccb1b8294e3ebf2ad65bb1564aacd971fd67ee03 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Mon, 20 Jan 2025 17:04:37 -0800 Subject: [PATCH] Avoid drawing out of bounds by drawing just the intersection of dirtyRect and bounds. --- Mac/MainWindow/IconView.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Mac/MainWindow/IconView.swift b/Mac/MainWindow/IconView.swift index 2ae161548..46b96a75d 100644 --- a/Mac/MainWindow/IconView.swift +++ b/Mac/MainWindow/IconView.swift @@ -89,7 +89,8 @@ final class IconView: NSView { let color = NSApplication.shared.effectiveAppearance.isDarkMode ? IconView.darkBackgroundColor : IconView.lightBackgroundColor color.set() - dirtyRect.fill() + let r = NSIntersectionRect(dirtyRect, bounds) + r.fill() } }