From fa23149765ffa32f1a459723b9b3849fdbf52cf6 Mon Sep 17 00:00:00 2001 From: Jordan Baird Date: Sun, 17 Dec 2023 12:12:10 -0700 Subject: [PATCH] Fix `ColorWell` receiving events from other windows --- Sources/ColorWellKit/Views/SwiftUI/ColorWellRepresentable.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/ColorWellKit/Views/SwiftUI/ColorWellRepresentable.swift b/Sources/ColorWellKit/Views/SwiftUI/ColorWellRepresentable.swift index 0ff24c1..ecf1e72 100644 --- a/Sources/ColorWellKit/Views/SwiftUI/ColorWellRepresentable.swift +++ b/Sources/ColorWellKit/Views/SwiftUI/ColorWellRepresentable.swift @@ -144,6 +144,7 @@ struct ColorWellRepresentable: NSViewRepresentable { let locationInWindow = event.locationInWindow guard let colorWell, + event.window === colorWell.window, colorWell.frameConvertedToWindow.contains(locationInWindow), let segment = colorWell.segment(at: locationInWindow) else {