diff options
Diffstat (limited to 'src/pardes.zig')
| -rw-r--r-- | src/pardes.zig | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/pardes.zig b/src/pardes.zig index 0f3f87f2..829a7bfd 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -3690,7 +3690,9 @@ pub const Event = union(enum) { command: []const u8, /// Native shells may preserve sub-cell wheel distance in physical pixels. /// TTY button events still enter through the ordinary mouse path. - pdf_scroll: struct { pane: u8, delta_pixels: f32 }, + /// `glide`: a wheel's notch, which the strip glides; a touchpad's + /// fraction is followed as it comes. + pdf_scroll: struct { pane: u8, delta_pixels: f32, glide: bool = true }, pinch: f32, touch_scroll: f32, /// The host pointer left the drawable area. Unlike an out-of-range motion, @@ -6164,7 +6166,7 @@ pub const Pardes = struct { if (scroll.pane < MAX_PANES) { if (p.panes[scroll.pane]) |pane| { if (pane.hasPdf() and p.native_images) - _ = panes.Pdf.scrollPane(p, pane, @floatCast(scroll.delta_pixels)); + _ = panes.Pdf.scrollPane(p, pane, @floatCast(scroll.delta_pixels), scroll.glide); } } } @@ -7737,7 +7739,7 @@ pub const Pardes = struct { /// is for the stepped animations, which count frames of `frame_ns`. pub fn continuous(p: *const Pardes) bool { for (p.lifts) |spring| if (!spring.settled) return true; - return p.cursor_glide.moving() or p.shell_continuous; + return p.cursor_glide.moving() or p.shell_continuous or panes.Pdf.moving(p); } /// For shells that only need a yes or no: macOS and the board, which |
