Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions prototype/App/GestureProbe.swift
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,13 @@ extension GlanceProbe {
self.shoot(cocoaFrame(fromAXPosition: original.origin, size: original.size), "follow-mid")
}
}
// 盖板用 calm(0.5 s 临界阻尼)退回,收敛到撤掉约 1 s:先照旧等 0.7 s 看有没有误执行,
// 再等盖板真的撤掉,松手后最多 1.5 s;超时才算留下了盖板(下面的 guard 报出来)。
let coverDeadline = CACurrentMediaTime() + 1.5
try await Task.sleep(for: .milliseconds(700), clock: .suspending)
while effects.activeCount != 0, CACurrentMediaTime() < coverDeadline {
try await Task.sleep(for: .milliseconds(50), clock: .suspending)
}
guard owner.shaded[id] == nil, gestures.lastPerformed?.action == performedBefore else {
throw EffectError.unavailable("pull-back still acted")
}
Expand Down