style(touch): rustfmt the presenter finger dispatch + gesture engine
ci / web (push) Successful in 52s
ci / docs-site (push) Successful in 1m5s
apple / swift (push) Successful in 4m33s
ci / bench (push) Successful in 5m22s
android-screenshots / screenshots (push) Successful in 3m30s
ci / rust (push) Successful in 23m9s
decky / build-publish (push) Successful in 1m23s
release / apple (push) Successful in 24m48s
android / android (push) Successful in 12m54s
arch / build-publish (push) Successful in 13m16s
windows / build (aarch64-pc-windows-msvc) (push) Successful in 55s
web-screenshots / screenshots (push) Successful in 2m51s
docker / deploy-docs (push) Successful in 9s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 28s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 23s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 24s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 30s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 30s
flatpak / build-publish (push) Successful in 7m4s
windows / build (x86_64-pc-windows-msvc) (push) Successful in 1m19s
linux-client-screenshots / screenshots (push) Successful in 7m45s
rpm / build-publish (43, bazzite, punktfunk-fedora-rpm) (push) Successful in 14m47s
windows-host / package (push) Failing after 7m43s
rpm / build-publish (44, fedora-44, punktfunk-fedora44-rpm) (push) Successful in 12m47s
windows-msix / package (arm64, C:\Users\Public\ffmpeg-arm64, --no-default-features, aarch64-pc-windows-msvc, C:\t-a64) (push) Successful in 3m51s
deb / build-publish (push) Successful in 12m5s
windows-msix / package (x64, C:\Users\Public\ffmpeg, , x86_64-pc-windows-msvc, C:\t) (push) Successful in 4m2s
apple / screenshots (push) Successful in 19m24s
ci / web (push) Successful in 52s
ci / docs-site (push) Successful in 1m5s
apple / swift (push) Successful in 4m33s
ci / bench (push) Successful in 5m22s
android-screenshots / screenshots (push) Successful in 3m30s
ci / rust (push) Successful in 23m9s
decky / build-publish (push) Successful in 1m23s
release / apple (push) Successful in 24m48s
android / android (push) Successful in 12m54s
arch / build-publish (push) Successful in 13m16s
windows / build (aarch64-pc-windows-msvc) (push) Successful in 55s
web-screenshots / screenshots (push) Successful in 2m51s
docker / deploy-docs (push) Successful in 9s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 28s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 23s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 24s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 30s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 30s
flatpak / build-publish (push) Successful in 7m4s
windows / build (x86_64-pc-windows-msvc) (push) Successful in 1m19s
linux-client-screenshots / screenshots (push) Successful in 7m45s
rpm / build-publish (43, bazzite, punktfunk-fedora-rpm) (push) Successful in 14m47s
windows-host / package (push) Failing after 7m43s
rpm / build-publish (44, fedora-44, punktfunk-fedora44-rpm) (push) Successful in 12m47s
windows-msix / package (arm64, C:\Users\Public\ffmpeg-arm64, --no-default-features, aarch64-pc-windows-msvc, C:\t-a64) (push) Successful in 3m51s
deb / build-publish (push) Successful in 12m5s
windows-msix / package (x64, C:\Users\Public\ffmpeg, , x86_64-pc-windows-msvc, C:\t) (push) Successful in 4m2s
apple / screenshots (push) Successful in 19m24s
Wrap the long dispatch_finger call args, Abs struct literals, and Act::Button/ Scroll/MoveRel pushes per rustfmt (the CI fmt check on pf-presenter). No behavior change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -598,7 +598,15 @@ fn run_inner(mut opts: SessionOpts, mut mode: ModeCtl) -> Result<Option<Outcome>
|
||||
..
|
||||
} => {
|
||||
if is_direct_touch(touch_id)
|
||||
&& dispatch_finger(FingerPhase::Down, &window, &mut stream, finger_id, x, y, timestamp)
|
||||
&& dispatch_finger(
|
||||
FingerPhase::Down,
|
||||
&window,
|
||||
&mut stream,
|
||||
finger_id,
|
||||
x,
|
||||
y,
|
||||
timestamp,
|
||||
)
|
||||
{
|
||||
bump_stats_tier(&mut stats_verbosity, &mut stream, &presenter);
|
||||
}
|
||||
@@ -612,7 +620,15 @@ fn run_inner(mut opts: SessionOpts, mut mode: ModeCtl) -> Result<Option<Outcome>
|
||||
..
|
||||
} => {
|
||||
if is_direct_touch(touch_id)
|
||||
&& dispatch_finger(FingerPhase::Move, &window, &mut stream, finger_id, x, y, timestamp)
|
||||
&& dispatch_finger(
|
||||
FingerPhase::Move,
|
||||
&window,
|
||||
&mut stream,
|
||||
finger_id,
|
||||
x,
|
||||
y,
|
||||
timestamp,
|
||||
)
|
||||
{
|
||||
bump_stats_tier(&mut stats_verbosity, &mut stream, &presenter);
|
||||
}
|
||||
@@ -626,7 +642,15 @@ fn run_inner(mut opts: SessionOpts, mut mode: ModeCtl) -> Result<Option<Outcome>
|
||||
..
|
||||
} => {
|
||||
if is_direct_touch(touch_id)
|
||||
&& dispatch_finger(FingerPhase::Up, &window, &mut stream, finger_id, x, y, timestamp)
|
||||
&& dispatch_finger(
|
||||
FingerPhase::Up,
|
||||
&window,
|
||||
&mut stream,
|
||||
finger_id,
|
||||
x,
|
||||
y,
|
||||
timestamp,
|
||||
)
|
||||
{
|
||||
bump_stats_tier(&mut stats_verbosity, &mut stream, &presenter);
|
||||
}
|
||||
@@ -1374,15 +1398,32 @@ fn dispatch_finger(
|
||||
let abs = match st.last_video {
|
||||
Some(video) => {
|
||||
let (ax, ay, aw, ah) = finger_to_content((pw, ph), video, x, y);
|
||||
Abs { x: ax, y: ay, w: aw, h: ah }
|
||||
Abs {
|
||||
x: ax,
|
||||
y: ay,
|
||||
w: aw,
|
||||
h: ah,
|
||||
}
|
||||
}
|
||||
None if phase == FingerPhase::Up => Abs { x: 0, y: 0, w: 0, h: 0 },
|
||||
None if phase == FingerPhase::Up => Abs {
|
||||
x: 0,
|
||||
y: 0,
|
||||
w: 0,
|
||||
h: 0,
|
||||
},
|
||||
None => return false,
|
||||
};
|
||||
let Some(cap) = st.capture.as_mut() else {
|
||||
return false;
|
||||
};
|
||||
cap.dispatch_finger(phase, finger_id, wx, wy, abs, timestamp as f64 / 1_000_000.0)
|
||||
cap.dispatch_finger(
|
||||
phase,
|
||||
finger_id,
|
||||
wx,
|
||||
wy,
|
||||
abs,
|
||||
timestamp as f64 / 1_000_000.0,
|
||||
)
|
||||
}
|
||||
|
||||
/// Advance the stats-overlay tier and re-render the OSD immediately from the last window
|
||||
@@ -1759,7 +1800,10 @@ mod tests {
|
||||
// Video exactly fills the window (no letterbox): normalized finger → content
|
||||
// corners/center map straight through, and the surface size is the video size.
|
||||
let video = (1920, 1080);
|
||||
assert_eq!(finger_to_content((1920, 1080), video, 0.0, 0.0), (0, 0, 1920, 1080));
|
||||
assert_eq!(
|
||||
finger_to_content((1920, 1080), video, 0.0, 0.0),
|
||||
(0, 0, 1920, 1080)
|
||||
);
|
||||
assert_eq!(
|
||||
finger_to_content((1920, 1080), video, 1.0, 1.0),
|
||||
(1920, 1080, 1920, 1080)
|
||||
@@ -1782,8 +1826,14 @@ mod tests {
|
||||
assert_eq!((w, h), (1280, 720));
|
||||
assert_eq!(cy, 360);
|
||||
// y=0.01 → window pixel 8, above the 40px bar → clamps to content top (0).
|
||||
assert_eq!(finger_to_content(surface, video, 0.5, 0.01), (640, 0, 1280, 720));
|
||||
assert_eq!(
|
||||
finger_to_content(surface, video, 0.5, 0.01),
|
||||
(640, 0, 1280, 720)
|
||||
);
|
||||
// Bottom-right corner of the video content.
|
||||
assert_eq!(finger_to_content(surface, video, 1.0, 1.0), (1280, 720, 1280, 720));
|
||||
assert_eq!(
|
||||
finger_to_content(surface, video, 1.0, 1.0),
|
||||
(1280, 720, 1280, 720)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user