Skip to content
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

[Windows] Adjust min_dimensions and max_dimensions using AdjustWindowRectEx. #444

Merged
merged 1 commit into from
Apr 13, 2018

Conversation

Lymia
Copy link
Contributor

@Lymia Lymia commented Apr 2, 2018

This fixes #196, although it does not update the documentation as suggested in the comments.

@francesca64
Copy link
Member

Sorry for the wait; you're at the top of my list now. Could you rebase/merge with the current master?

@Lymia
Copy link
Contributor Author

Lymia commented Apr 13, 2018

Rebased onto master.

@Lymia
Copy link
Contributor Author

Lymia commented Apr 13, 2018

I don't know what's going on with AppVeyor. That looks like a sporadic failure.

@@ -622,6 +622,14 @@ pub struct WindowWrapper(HWND, HDC);
// https://github.com/retep998/winapi-rs/issues/396
unsafe impl Send for WindowWrapper {}

pub unsafe fn adjust_size(
(x, y): (u32, u32), style: DWORD, ex_style: DWORD,
Copy link
Member

Choose a reason for hiding this comment

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

Ooh, I never knew you could destructure a tuple in the function parameters. Thanks for teaching me something new today!

@francesca64
Copy link
Member

Thanks! Everything looks good, and it worked great when I tested it on Windows 10.

(I won't fuss about not making the documentation change, since the docs sorta need an overhaul soon anyway.)

@francesca64 francesca64 merged commit c327960 into rust-windowing:master Apr 13, 2018
@francesca64
Copy link
Member

...whoops, the CHANGELOG entry was under the wrong section from before. I'll have to remember to correct that.

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.

Win32: with_dimensions excludes decoration, with_max_dimensions includes them
2 participants