Skip to content

Windows: fix window resizing with decorations disabled #4188

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tymmesyde
Copy link

Fixes #4186

This fixes the client area preventing the window to be resized while decorations are disabled.
This is still not perfect, the top border of the window has a resize area shorter than normal windows because of the titlebar that needs to be hidden.

let window_attributes = WindowAttributes::default()
     .with_decorations(false)
     .with_resizable(true)
  • Tested on all platforms changed
  • Added an entry to the changelog module if knowledge of this change could be valuable to users
  • Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
  • Created or updated an example program if it would help users understand this functionality

@tymmesyde tymmesyde requested a review from notgull as a code owner April 6, 2025 01:29
@madsmtm madsmtm added B - bug Dang, that shouldn't have happened DS - windows labels Apr 21, 2025
@sout233
Copy link

sout233 commented Jun 5, 2025

I did something similar in #4181. But I found that we all have a problem: The border calculation logic of Windows10 and Windows11 is different.

I found this in tao's source code.
You can also search for its references . I think it might help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B - bug Dang, that shouldn't have happened DS - windows
Development

Successfully merging this pull request may close these issues.

[windows] winit window not resizable when .with_decorations(false) and .with_resizable(true)
3 participants