Skip to content

Allow crop selection to reach the right and bottom edges - #221

Merged
ekisu merged 5 commits into
masterfrom
fix/issue-140
Sep 12, 2026
Merged

ekisu merged 5 commits into
masterfrom
fix/issue-140

Conversation

@ekisu

@ekisu ekisu commented Sep 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

Snap the last displayed pixel to the exclusive video boundary so mouse-based crop selection can include the full right/bottom edge. Interior coordinate mapping is preserved.

Fixes #140
Tracked in #217.

Verification

  • During implementation, checked full-frame, reverse-selection, downscaled and letterboxed coordinates, plus unchanged interior points and a degenerate one-pixel display.
  • Build and CRLF-aware whitespace checks passed.
  • Removed the standalone compiler-driven test at review request. This PR now contains only the production fix; it does not add retained crop regression coverage to the mpv test harness.

At downscaled edges, the last screen pixel snaps to the full source boundary. Manual desktop interaction remains for review.

Current harness-based verification (supersedes historical test notes)

Rebased onto master 72d9d11, which includes #226 and #227. Tests load the normal built script and drive real mpv.

Four real Xvfb GUI tests cover full-frame/reverse selection, downscaling, letterboxing, and interior cropping with encoded dimensions. Unfixed script yields 639x359 instead of 640x360; edge regressions fail before the fix and pass afterward. Pinned Nix: 18 tests, 17 passed, 1 existing audio skip.

Latest rebase verification

Rebased onto master 72d9d11 after #227 merged. Normal build and the complete pinned-Nix suite pass, with two expected skips (audio fixture and unavailable optional libaom-av1 encoder).

@ekisu
ekisu changed the base branch from master to test/mpv-integration-harness September 12, 2026 00:54
Base automatically changed from test/mpv-integration-harness to master September 12, 2026 01:03
…s are inclusive indices while bottom_right is an exclusive bound the cursor can never reach. Snap the last OSD pixel to the exclusive video edge so dragging to the frame edge yields the full width/height. Interior mapping unchanged; reverse drag also yields full frame.
@ekisu

ekisu commented Sep 12, 2026

Copy link
Copy Markdown
Owner Author

Approved.

@ekisu
ekisu marked this pull request as ready for review September 12, 2026 19:29
@ekisu
ekisu merged commit fa54147 into master Sep 12, 2026
2 checks passed
@ekisu
ekisu deleted the fix/issue-140 branch September 12, 2026 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to fully select right/bottom edges of frame when cropping

1 participant