| | |
| | | private var lifecycleResidualOverlayWindows = 0 |
| | | private var lifecycleResidualVisibleOverlayWindows = 0 |
| | | var onSnapshotUpdated: (() -> Void)? |
| | | var onOpenSettings: (() -> Void)? |
| | | var onToggleWaterfallViewMode: (() -> Void)? |
| | | |
| | | private struct PendingCloseVerification { |
| | | let request: QuickSwitchCloseRequest |
| | |
| | | view.onBackgroundClick = { [weak self] in |
| | | self?.handleBackgroundClick() ?? false |
| | | } |
| | | view.onOpenSettings = { [weak self] in |
| | | self?.onOpenSettings?() |
| | | view.onToggleWaterfallViewMode = { [weak self] in |
| | | self?.onToggleWaterfallViewMode?() |
| | | } |
| | | view.setSuppressEventInput(!debugMouseSequence.isEmpty || !debugKeySequence.isEmpty) |
| | | view.onRequestClose = { [weak self] request in |
| | |
| | | |
| | | func retriggerFromShortcut() { |
| | | DevelopmentDiagnostics.log("quickSwitch.session.retriggerFromShortcut") |
| | | show() |
| | | guard isVisible else { |
| | | show() |
| | | return |
| | | } |
| | | |
| | | guard currentViewModel != nil else { |
| | | DevelopmentDiagnostics.log("quickSwitch.session.retriggerFromShortcut.noSnapshot", [ |
| | | "action": "fallbackShow" |
| | | ]) |
| | | show() |
| | | return |
| | | } |
| | | |
| | | let didCycle = view.hoverNextAppGroupIndex() |
| | | DevelopmentDiagnostics.log("quickSwitch.session.retriggerFromShortcut.hoverApp", [ |
| | | "didCycle": didCycle |
| | | ]) |
| | | |
| | | if !didCycle { |
| | | show() |
| | | } |
| | | } |
| | | |
| | | func setWaterfallViewMode(_ mode: QuickSwitchWaterfallViewMode) { |
| | |
| | | let fixtureActivation: Bool |
| | | let fixtureSpaceFilter: Bool |
| | | let fixtureSplitView: Bool |
| | | let fixtureMultiPageIdentity: Bool |
| | | let debugHoveredAppGroupIndex: Int? |
| | | let debugOverlayWidth: CGFloat? |
| | | let debugKeySequence: [String] |
| | |
| | | fixtureActivation: arguments.contains("--round01-fixture-window-activation"), |
| | | fixtureSpaceFilter: arguments.contains("--round01-fixture-space-filter"), |
| | | fixtureSplitView: arguments.contains("--round01-fixture-split-view"), |
| | | fixtureMultiPageIdentity: arguments.contains("--round01-fixture-multi-page-identity"), |
| | | debugHoveredAppGroupIndex: intValue(for: "--round01-debug-hover-app-index", in: arguments), |
| | | debugOverlayWidth: cgFloatValue(for: "--round01-debug-overlay-width", in: arguments), |
| | | debugKeySequence: stringListValue(for: "--round01-debug-key-sequence", in: arguments), |