Block the player dismiss pan from starting on side sliders

The window-level dismiss pan recognizes before SwiftUI's slider
DragGesture sets isAdjustingPlayerSliders, so dragging volume or
brightness often dismissed the player instead. Side sliders now publish
their frames and the pan refuses to begin from touches inside them.
This commit is contained in:
Arkadiusz Fal
2026-10-10 23:58:16 +02:00
parent cf1acb1986
commit 2d3ae1b0e5
3 changed files with 32 additions and 0 deletions

View File

@@ -144,6 +144,12 @@ final class NavigationCoordinator {
/// otherwise be cancelled and dismiss the player instead).
var panelResizeGrabberFrame: CGRect = .zero
/// Volume/brightness side slider frames in screen coordinates, keyed by
/// edge (leading = true). Touches inside must not start the sheet dismiss
/// pan — the window pan recognizes before SwiftUI's slider DragGesture
/// sets `isAdjustingPlayerSliders`, so the flag alone loses the race.
var playerSideSliderFrames: [Bool: CGRect] = [:]
/// Corner layout: width of the trailing screen-edge strip reserved for
/// the side column reveal swipe while the column is collapsed (0 when
/// not collapsed) — the seek pan must not begin from inside it.