Repository navigation
Conversation
|
Preview available at https://egui-pr-preview.github.io/pr/8775-codexfix-title-bar-drag-drift View snapshot changes at kitdiff |
yay
marked this pull request as ready for review
October 26, 2026 10:07
yay
marked this pull request as draft
October 26, 2026 10:37
yay
force-pushed
the
codex/fix-title-bar-drag-drift
branch
from
October 26, 2026 10:43
3a3e5c8 to
c0ebfb1
Compare
yay
marked this pull request as ready for review
October 26, 2026 10:52
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Notice the slow cursor drift:
Screen.Recording.2026-10-26.at.9.09.52.AM.mov
Dragging a window by its title bar accumulates rounding error: each frame adds the pointer delta to an already rounded position. Repeated half-pixel back-and-forth movements can move the window even when the pointer returns to the same position.
Retain the initial window pivot and add the total drag displacement, then apply the existing constraints and pixel rounding. Preserve the anchor while the drag is held, including when
PointerGonetemporarily removes coordinates; clear it when the gesture ends. The smallAreachange also prevents drag-anywhere from jumping to its starting point when displacement is unavailable.#7709 fixed this class of drift in
Areausing a fixed drag origin. The separate title-bar path introduced by #8183 used incremental deltas again. The regression tests protect that guarantee across title-bar, default, and drag-anywhere modes, five pixel scales, and layout retries. They also cover repeated gestures, returning from constraints, pointer exit/re-entry, and release outside the viewport. The fractional-motion and constraint-return tests fail without the fix.This PR also fixes #4441.