Browse Source

Merge pull request #12327 from AvaloniaUI/fix-macos-window-positioning

Fix window incorrect positioning with window startup location CenterScreen on MacOS
pull/12364/head
Steven Kirk 3 years ago
committed by GitHub
parent
commit
e394ca59fe
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      native/Avalonia.Native/src/OSX/WindowBaseImpl.mm

8
native/Avalonia.Native/src/OSX/WindowBaseImpl.mm

@ -151,6 +151,14 @@ HRESULT WindowBaseImpl::Hide() {
@autoreleasepool {
if (Window != nullptr) {
auto frame = [Window frame];
AvnPoint point;
point.X = frame.origin.x;
point.Y = frame.origin.y + frame.size.height;
lastPositionSet = ConvertPointY(point);
hasPosition = true;
[Window orderOut:Window];
}

Loading…
Cancel
Save