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

fix: bug of restoring window position on macos. #2345

Merged
merged 1 commit into from
Feb 8, 2024

Conversation

crupest
Copy link
Contributor

@crupest crupest commented Feb 7, 2024

Fix #2303

According to winit docs at https://docs.rs/winit/latest/winit/window/struct.WindowBuilder.html#method.with_position, with_position sets the position of top left corner of content rect instead of window rect on macOS, so a set_outer_position call is needed.

@falcucci
Copy link
Member

falcucci commented Feb 7, 2024

@crupest thank you for troubleshooting! but could you share some video/gif?

I am not able to reproduce on macOS Sonoma.

does it occurs with Stage Manager enabled/disabled?

@fredizzimo
Copy link
Member

It's strange that the function works differently on macOS, and then they have another function that makes it work the same...

I guess Winit did not want to break backwards compatibility or something.

@falcucci falcucci changed the title fix: fix the bug of restoring window position on macos. fix: bug of restoring window position on macos. Feb 7, 2024
@falcucci
Copy link
Member

falcucci commented Feb 7, 2024

@fredizzimo Approved. that's what I have thought as well.

According to winit docs, `with_position` sets the position of top left
corner of *content* rect instead of *window* rect on macOS, so a
`set_outer_position` call is needed.
@fredizzimo fredizzimo merged commit edcb60b into neovide:main Feb 8, 2024
2 checks passed
@fredizzimo
Copy link
Member

Thank you!

@crupest crupest deleted the macos-window-position branch February 8, 2024 13:52
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.

On MacOS, Neovide window moves up after each relaunch
3 participants