From 72219babd9bf0a4ce6fc26af91ee969a8705f053 Mon Sep 17 00:00:00 2001
From: Ariver <shanghai3168@gmail.com>
Date: Thu, 11 Jun 2026 19:50:27 +0800
Subject: [PATCH] Refine Quick Switch Space filter interactions

---
 C1.source/Sources/Aligner/AlignerApplicationDelegate.swift |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/C1.source/Sources/Aligner/AlignerApplicationDelegate.swift b/C1.source/Sources/Aligner/AlignerApplicationDelegate.swift
index b2d0fa9..4fcad5f 100644
--- a/C1.source/Sources/Aligner/AlignerApplicationDelegate.swift
+++ b/C1.source/Sources/Aligner/AlignerApplicationDelegate.swift
@@ -354,6 +354,7 @@
             let controller = QuickSwitchSessionController(
                 snapshotLoader: quickSwitchSnapshotLoader(),
                 windowActivationService: quickSwitchWindowActivationService(),
+                spaceActivationService: quickSwitchSpaceActivationService(),
                 windowCloseService: quickSwitchWindowCloseService(),
                 disableScreenshotRefresh: round1QuickSwitchOptions.disableScreenshotRefresh,
                 closeConfirmationRequired: quickSwitchConfirmBeforeClose,
@@ -428,6 +429,7 @@
             let controller = QuickSwitchSessionController(
                 snapshotLoader: quickSwitchSnapshotLoader(),
                 windowActivationService: quickSwitchWindowActivationService(),
+                spaceActivationService: quickSwitchSpaceActivationService(),
                 windowCloseService: quickSwitchWindowCloseService(),
                 disableScreenshotRefresh: round1QuickSwitchOptions.disableScreenshotRefresh,
                 closeConfirmationRequired: quickSwitchConfirmBeforeClose,
@@ -546,6 +548,14 @@
         return CGWindowAXWindowService(spaceIDsByWindowIDProvider: { _ in [:] })
     }
 
+    private func quickSwitchSpaceActivationService() -> any SpaceActivationServiceProtocol {
+        if round1QuickSwitchOptions.debugWindowActivation {
+            return DebugSpaceActivationService()
+        }
+
+        return PrivateSpaceActivationService()
+    }
+
     private func quickSwitchWindowCloseService() -> any WindowCloseServiceProtocol {
         if round1QuickSwitchOptions.debugWindowClose {
             return DebugWindowCloseService()

--
Gitblit v1.9.3