From 63128a870cbedb841cb19cdfbf2bf54e3dfbc25c Mon Sep 17 00:00:00 2001
From: Ariver <shanghai3168@gmail.com>
Date: Fri, 12 Jun 2026 11:55:58 +0800
Subject: [PATCH] Implement horizontal Quick Switch waterfall

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

diff --git a/C1.source/Sources/Aligner/AlignerApplicationDelegate.swift b/C1.source/Sources/Aligner/AlignerApplicationDelegate.swift
index b2d0fa9..f021a10 100644
--- a/C1.source/Sources/Aligner/AlignerApplicationDelegate.swift
+++ b/C1.source/Sources/Aligner/AlignerApplicationDelegate.swift
@@ -354,8 +354,10 @@
             let controller = QuickSwitchSessionController(
                 snapshotLoader: quickSwitchSnapshotLoader(),
                 windowActivationService: quickSwitchWindowActivationService(),
+                spaceActivationService: quickSwitchSpaceActivationService(),
                 windowCloseService: quickSwitchWindowCloseService(),
                 disableScreenshotRefresh: round1QuickSwitchOptions.disableScreenshotRefresh,
+                waterfallViewMode: quickSwitchWaterfallViewMode(),
                 closeConfirmationRequired: quickSwitchConfirmBeforeClose,
                 onCloseConfirmationDisabled: { [weak self] in
                     self?.setQuickSwitchConfirmBeforeClose(false)
@@ -428,8 +430,10 @@
             let controller = QuickSwitchSessionController(
                 snapshotLoader: quickSwitchSnapshotLoader(),
                 windowActivationService: quickSwitchWindowActivationService(),
+                spaceActivationService: quickSwitchSpaceActivationService(),
                 windowCloseService: quickSwitchWindowCloseService(),
                 disableScreenshotRefresh: round1QuickSwitchOptions.disableScreenshotRefresh,
+                waterfallViewMode: quickSwitchWaterfallViewMode(),
                 closeConfirmationRequired: quickSwitchConfirmBeforeClose,
                 onCloseConfirmationDisabled: { [weak self] in
                     self?.setQuickSwitchConfirmBeforeClose(false)
@@ -546,6 +550,19 @@
         return CGWindowAXWindowService(spaceIDsByWindowIDProvider: { _ in [:] })
     }
 
+    private func quickSwitchWaterfallViewMode() -> QuickSwitchWaterfallViewMode {
+        round1QuickSwitchOptions.waterfallViewMode
+            ?? UserDefaultsPreferenceStore().read().quickSwitchWaterfallViewMode
+    }
+
+    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