Skip to content

Let the resize border win over the caption buttons on the side edges - #5477

Merged
Gabriel Dufresne (GabrielDuf) merged 2 commits into
mainfrom
fix/5471-resize-top-right-corner
Oct 6, 2026
Merged

Gabriel Dufresne (GabrielDuf) merged 2 commits into
mainfrom
fix/5471-resize-top-right-corner

Conversation

@GabrielDuf

Copy link
Copy Markdown
Contributor

This pull request introduces an improvement to the window resize behavior in the MainWindow.axaml.cs file. Specifically, it adds logic to handle hit-testing for window borders, which helps support resizing from the edges.

Window border hit-testing enhancement:

  • Added a call to HitTestResizeBorder during the WM_NCHITTEST message handling. If the result indicates a border edge (other than HTNOWHERE or HTTOP), the message is handled and the appropriate value is returned, enabling proper edge-based resizing.

@GabrielDuf Gabriel Dufresne (GabrielDuf) linked an issue Oct 6, 2026 that may be closed by this pull request
4 tasks done

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The focused Windows-only change correctly preserves top-edge caption behavior while prioritizing side and corner resizing.

Review effort: Balanced
Findings: None

What changed in this PR

Improves Windows custom title-bar resizing by prioritizing resize borders over caption buttons.

Changes:

  • Insets caption buttons from the resize border.
  • Prioritizes side and corner resize hit tests while preserving top-edge Snap Layout behavior.
File Description
src/​UniGetUI.Avalonia/​Views/​MainWindow.axaml.cs Updates caption-button layout and Windows non-client hit testing.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@randy-but-a-ro randy-but-a-ro Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🤖 Pull request was approved automatically: the AI review is complete and all its review threads are resolved. 🎉

Integration Details
{
	"deliveryId": "083ee520-c19a-11f1-818e-6d8b35e9a7f2",
	"headSha": "86934b3bcbfad39d80de58218350621b7677adec",
	"reviewer": "copilot-pull-request-reviewer[bot]"
}

@GabrielDuf
Gabriel Dufresne (GabrielDuf) merged commit af1431e into main Oct 6, 2026
6 checks passed
@GabrielDuf
Gabriel Dufresne (GabrielDuf) deleted the fix/5471-resize-top-right-corner branch October 6, 2026 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Cannot resize the window when video acceleration is off

2 participants