Skip to content

desktop: fix macos size / position dependency #24

@nickav

Description

@nickav

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 tractordev/apptron#61

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions