Skip to content

fix: use 0,0 for min dimensions in Linux disableSizeConstraints#5206

Draft
leaanthony wants to merge 1 commit intomasterfrom
fix/4429-linux-size-constraints
Draft

fix: use 0,0 for min dimensions in Linux disableSizeConstraints#5206
leaanthony wants to merge 1 commit intomasterfrom
fix/4429-linux-size-constraints

Conversation

@leaanthony
Copy link
Copy Markdown
Member

Summary

  • Linux disableSizeConstraints() was passing monitor position coordinates (x, y) as minimum width/height to setMinMaxSize()
  • On multi-monitor setups this set nonsensical minimum sizes (e.g., minWidth=1920 for a monitor at x=1920)
  • Pass 0, 0 for min dimensions, consistent with Windows and macOS behavior

Test plan

  • TestDisableSizeConstraintsDoesNotUsePositionAsDimension verifies position values don't leak into min dimensions
  • TestSetMinMaxSizeZeroMinIsCorrect verifies disabled constraints have zero min and positive max
  • Manual: fullscreen a window on a multi-monitor setup, unfullscreen, verify the window can be resized freely

Fixes #4429

The Linux disableSizeConstraints() method was incorrectly passing the
monitor's position coordinates (x, y) as the minimum width and height
parameters to setMinMaxSize(). On multi-monitor setups, this could set
nonsensical minimum sizes (e.g., minX=1920 for a monitor at x=1920).

Pass 0, 0 for min dimensions instead, which is consistent with Windows
and macOS behavior.

Fixes #4429
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 21, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: fe266e60-c129-45b7-a64d-a3d07c3305ae

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/4429-linux-size-constraints

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@leaanthony leaanthony changed the base branch from v3-alpha to master April 29, 2026 13:07
@leaanthony
Copy link
Copy Markdown
Member Author

Good bug fix! Using monitor position coordinates as minimum width/height was causing nonsensical constraints on multi-monitor setups. The tests verify the fix.

I've dispatched cross-platform test sub-issues:

Once all platforms report back with successful test results, I'll apply the reviewed ✅ label.

CC @leaanthony

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.

v3: Window maximum width and height issues on Linux Wayland

1 participant