From f0f11765ff73bc4bfa3353301186f2c379bcf3cb Mon Sep 17 00:00:00 2001
From: Ariver <shanghai3168@gmail.com>
Date: Sat, 06 Jun 2026 23:34:46 +0800
Subject: [PATCH] fix: 严格 Space Lane hit test 垂直 band 检查,空区域(非 lane y band)直接 nil,彻底防止 hoveredSpaceLaneID 误设导致 spaceFocused 粘住 (v0.0.32)

---
 C1.source/Sources/Aligner/Infrastructure/Windows/CGWindowAXWindowService.swift |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/C1.source/Sources/Aligner/Infrastructure/Windows/CGWindowAXWindowService.swift b/C1.source/Sources/Aligner/Infrastructure/Windows/CGWindowAXWindowService.swift
index 49a7cf9..799c87d 100644
--- a/C1.source/Sources/Aligner/Infrastructure/Windows/CGWindowAXWindowService.swift
+++ b/C1.source/Sources/Aligner/Infrastructure/Windows/CGWindowAXWindowService.swift
@@ -645,6 +645,14 @@
                 && rawBounds.height > WindowEnumerationPolicy.minimumVisibleHeight
         }
 
+        if app.bundleIdentifier == "com.apple.finder" {
+            return layer == 0
+                && alpha > 0
+                && !trimmedTitle.isEmpty
+                && rawBounds.width > WindowEnumerationPolicy.minimumVisibleWidth
+                && rawBounds.height > WindowEnumerationPolicy.minimumVisibleHeight
+        }
+
         guard app.bundleIdentifier == "io.dcloud.HBuilderX" else { return false }
 
         return layer == 0

--
Gitblit v1.9.3