Browse Source

Don't return FrameSize until window is shown.

Since #8629, the content size isn't set until the window is shown, so we can't know the frame size.
pull/8405/head
Steven Kirk 4 years ago
parent
commit
355ba94fa7
  1. 2
      native/Avalonia.Native/src/OSX/WindowBaseImpl.mm

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

@ -224,7 +224,7 @@ HRESULT WindowBaseImpl::GetFrameSize(AvnSize *ret) {
if (ret == nullptr)
return E_POINTER;
if(Window != nullptr){
if(Window != nullptr && _shown){
auto frame = [Window frame];
ret->Width = frame.size.width;
ret->Height = frame.size.height;

Loading…
Cancel
Save