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 window positioning issue on macOS #7839
base: master
Are you sure you want to change the base?
Conversation
Why did you switch the PR to draft status? Did you encounter any issues? |
@chrisduerr I encountered several unexpected behaviors while testing the PR. So, I'm going to fix the |
50d438d
to
fbd82ed
Compare
fbd82ed
to
88cb039
Compare
#[cfg(target_os = "macos")] | ||
if let Some(position) = config.window.position { | ||
window.set_outer_position(PhysicalPosition::new(position.x as u32, position.y as u32)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you just add this using trial and error? We're already setting the position on startup, why are you setting it again?
This does not seem like the proper solution, it just looks like we're moving it a bunch hoping that one of the operations will stick.
PR addresses an issue related to window positioning on macOS. The problem arises when setting the window to visible after resizing, which leads to inconsistent window positioning behavior after resizing. Specifically, the configuration window's position becomes dependent on the window size, causing it to appear at the bottom left corner of the window instead of the expected top left corner.
To fix this issue, I adjusted the order of operations to set the window visible before resizing.
This PR is linked to the corresponding GitHub issue: Link to GitHub issue