Ariver
2026-05-29 dfe1ecadbb03a9e9311da0471caafc65e4c798df
Apptag/AppGridCollectionView.swift
@@ -252,9 +252,19 @@
    }
}
private final class AppGridScrollView: NSScrollView {
    override var acceptsFirstResponder: Bool { true }
    override func scrollWheel(with event: NSEvent) {
        window?.makeKeyAndOrderFront(nil)
        window?.orderFrontRegardless()
        super.scrollWheel(with: event)
    }
}
final class AppGridCollectionHostView: NSView, AppEmptyDropReceivingView {
    private let emptyDropTargetID = UUID()
    private let scrollView = NSScrollView()
    private let scrollView = AppGridScrollView()
    private let collectionView = NSCollectionView()
    private let gridLayout = AppGridContainerCollectionLayout()
    private weak var coordinator: AppGridCollectionView.Coordinator?
@@ -262,6 +272,7 @@
    private var lastLayoutSize: NSSize = .zero
    private var lastReportedBoundsOrigin: NSPoint?
    private var scrollUnfreezeWorkItem: DispatchWorkItem?
    private var scrollActivityIsActive = false
    override var isFlipped: Bool { true }
@@ -375,14 +386,18 @@
    }
    private func handleScrollActivity() {
        if coordinator?.setScrollBubbleDisabled(true) == true {
            refreshVisibleRuntimeState()
        if !scrollActivityIsActive {
            scrollActivityIsActive = true
            if coordinator?.setScrollBubbleDisabled(true) == true {
                refreshVisibleRuntimeState()
            }
            coordinator?.onScrollActivity()
        }
        coordinator?.onScrollActivity()
        scrollUnfreezeWorkItem?.cancel()
        let workItem = DispatchWorkItem { [weak self] in
            guard let self else { return }
            self.scrollActivityIsActive = false
            self.replayPointerHover()
            if self.coordinator?.setScrollBubbleDisabled(false) == true {
                self.refreshVisibleRuntimeState()