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

windowWillResize_toSize -> windowDidResize #30

Merged
merged 2 commits into from
Dec 8, 2024

Conversation

foxnne
Copy link
Contributor

@foxnne foxnne commented Dec 6, 2024

This PR is necessary for hexops/mach#1317 and needs to be merged first so that the build.zig.zon can be updated.

After more research, I found that windowDidResize is the better way to get the window size change, as we need to get the frame and use ContentRectForFrameRect to make sure we are getting the correct window size with respect to the titlebar. This fixes an issue where resizing the window with the mouse, and then programmatically setting the window size would yield an incorrect window size.

  • By selecting this checkbox, I agree to license my contributions to this project under the license(s) described in the LICENSE file, and I have the right to do so or have received permission to do so by an employer or client I am producing work for whom has this right.

foxnne added a commit to foxnne/mach that referenced this pull request Dec 6, 2024
…here window size didn't include titlebar height. Depends on hexops/mach-objc#30
@emidoots emidoots merged commit eb1e1ee into hexops:main Dec 8, 2024
2 checks passed
emidoots pushed a commit to hexops/mach that referenced this pull request Dec 8, 2024
…here window size didn't include titlebar height. Depends on hexops/mach-objc#30
@foxnne foxnne deleted the window_size branch December 12, 2024 04:15
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.

2 participants