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 macos size / position dependency #62

Open
nickav opened this issue Apr 7, 2023 · 0 comments
Open

fix macos size / position dependency #62

nickav opened this issue Apr 7, 2023 · 0 comments

Comments

@nickav
Copy link
Collaborator

nickav commented Apr 7, 2023

On MacOS if you call SetPosition then SetSize on a window back to back, the window will not be placed where you wanted it to be. Instead it will be off by the difference between the old height and the new height. This (i think) is because SetFrameTopLeftPoint_ has an implicit dependency on the frame's height, which maybe doesn't get updated until the next frame? Not exactly sure

Steps to repro:

Create a window with some size (e.g. 200x200), then call:

win.SetPosition(misc.Position{ X: 80, Y: 80 })
win.SetSize(misc.Size{ Width: 400, Height: 400 })

Notice that the window is not at 80, 80 in screen space (where the top-left is 0,0 of the screen)

See more details in #61

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

No branches or pull requests

1 participant