Skip to content

Fix incorrect window width when cycling between displays - #1821

Merged
rxhanson merged 1 commit into
rxhanson:mainfrom
globetro:fix-monitor-right-edge
Aug 21, 2026
Merged

Fix incorrect window width when cycling between displays#1821
rxhanson merged 1 commit into
rxhanson:mainfrom
globetro:fix-monitor-right-edge

Conversation

@globetro

@globetro globetro commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Background

As a long time Rectangle Pro user, this particular bug has been driving me crazy for years. I've verified this fix via a local build. I can also attach video showing the issue and fixed behavior if that's helpful.

Summary

Cycling a window from a smaller display to a larger one could leave it too narrow. Rectangle treated the destination as the starting display, skipping its cross-display resize retries. Those retries also checked only height.

This fix tracks the actual source display and retries when either width or height is incorrect. It preserves the existing retry limit.

Fixes #1064. Related to #1264.

Testing

  • Added one regression test reproducing the 400-point width shortfall.
  • All 15 focused tests pass.
  • Manually verified the final build on a laptop and external monitor.

@rxhanson
rxhanson merged commit 64a9186 into rxhanson:main Aug 21, 2026
1 check passed
@rxhanson

Copy link
Copy Markdown
Owner

Sorry that you had to endure this bug for a long time, but thank you for fixing it!

I'm in the middle of a Rectangle Pro release where I'm rolling in a lot of Rectangle changes, and will include this one.

@globetro

globetro commented Aug 22, 2026 via email

Copy link
Copy Markdown
Contributor Author

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.

Cycle through displays are are not working with displays of different resolutions

2 participants