Skip to content

fix: stabilize cross-display drag snapback#310

Merged
acsandmann merged 1 commit intoacsandmann:mainfrom
leokeba:fix/cross-display-snapback-stability
Mar 18, 2026
Merged

fix: stabilize cross-display drag snapback#310
acsandmann merged 1 commit intoacsandmann:mainfrom
leokeba:fix/cross-display-snapback-stability

Conversation

@leokeba
Copy link
Copy Markdown
Contributor

@leokeba leokeba commented Mar 16, 2026

I have an issue when dragging a window to an external screen, the window basically starts snapping back and forth very fast until I kill rift.

To fix it, I had to :

  • Make space classification geometry-first in reactor.
  • Coalesce duplicate pending layout targets in animation/instant layout update paths.

Resolve window space from frame geometry before server-reported space to avoid stale-space snapback during cross-display drags. Also coalesce duplicate pending layout targets in animation/instant layout paths to reduce brief oscillation bursts.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes rapid “snapback” oscillation when dragging windows across displays by improving space resolution and preventing redundant layout requests while a target frame is already pending.

Changes:

  • Prefer geometry-based space classification before consulting the window-server-reported space.
  • Skip redundant animated layout requests when the same target frame is already pending for a window.
  • Skip redundant instant layout requests when the same target frame is already pending for a window.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/actor/reactor/animation.rs Coalesces duplicate layout/instant-layout frame targets by skipping requests already pending in the transaction store.
src/actor/reactor.rs Makes best_space_for_window geometry-first, falling back to window-server space only when geometry cannot resolve.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@acsandmann acsandmann merged commit 1b596c9 into acsandmann:main Mar 18, 2026
5 of 6 checks passed
@acsandmann
Copy link
Copy Markdown
Owner

looks good, thanks for the pr

acsandmann added a commit that referenced this pull request Mar 23, 2026
Resolve window space from frame geometry before server-reported space to avoid stale-space snapback during cross-display drags. Also coalesce duplicate pending layout targets in animation/instant layout paths to reduce brief oscillation bursts.
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.

3 participants