Browse Source

ensure position property is consistent before window is open.

pull/8158/head
Dan Walmsley 4 years ago
parent
commit
03e00d6b71
  1. 13
      native/Avalonia.Native/src/OSX/WindowBaseImpl.mm

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

@ -364,12 +364,17 @@ HRESULT WindowBaseImpl::GetPosition(AvnPoint *ret) {
return E_POINTER;
}
auto frame = [Window frame];
if(Window != nullptr) {
auto frame = [Window frame];
ret->X = frame.origin.x;
ret->Y = frame.origin.y + frame.size.height;
ret->X = frame.origin.x;
ret->Y = frame.origin.y + frame.size.height;
*ret = ConvertPointY(*ret);
*ret = ConvertPointY(*ret);
} else
{
*ret = lastPositionSet;
}
return S_OK;
}

Loading…
Cancel
Save