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 | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/C1.source/Sources/Aligner/AlignerApplicationDelegate.swift b/C1.source/Sources/Aligner/AlignerApplicationDelegate.swift
index 3b968f2..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,
@@ -517,6 +519,10 @@
return FixtureQuickSwitchSnapshotLoader(appCount: 1, mode: .candidateFiltering)
}
+ if round1QuickSwitchOptions.fixtureSpaceFilter {
+ return FixtureQuickSwitchSnapshotLoader(appCount: 1, mode: .spaceFilter)
+ }
+
if let fixtureAppCount = round1QuickSwitchOptions.fixtureAppCount {
return FixtureQuickSwitchSnapshotLoader(
appCount: fixtureAppCount,
@@ -542,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