fix: use 0,0 for min dimensions in Linux disableSizeConstraints#5206
fix: use 0,0 for min dimensions in Linux disableSizeConstraints#5206leaanthony wants to merge 1 commit intomasterfrom
Conversation
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
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
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 CC @leaanthony |
Summary
disableSizeConstraints()was passing monitor position coordinates(x, y)as minimum width/height tosetMinMaxSize()minWidth=1920for a monitor atx=1920)0, 0for min dimensions, consistent with Windows and macOS behaviorTest plan
TestDisableSizeConstraintsDoesNotUsePositionAsDimensionverifies position values don't leak into min dimensionsTestSetMinMaxSizeZeroMinIsCorrectverifies disabled constraints have zero min and positive maxFixes #4429