Browse Source

Revert "[OSX] fix resize calls before window shown."

This reverts commit 06807324d0.
pull/7187/head
Dan Walmsley 4 years ago
parent
commit
54e4f13ea6
  1. 18
      native/Avalonia.Native/src/OSX/window.mm

18
native/Avalonia.Native/src/OSX/window.mm

@ -27,7 +27,6 @@ public:
AvnPoint lastPositionSet;
NSString* _lastTitle;
IAvnMenu* _mainMenu;
NSSize _lastSize;
bool _shown;
bool _inResize;
@ -36,7 +35,6 @@ public:
{
_shown = false;
_inResize = false;
_lastSize = NSSize { 0, 0 };
_mainMenu = nullptr;
BaseEvents = events;
_glContext = gl;
@ -227,17 +225,9 @@ public:
if(ret == nullptr)
return E_POINTER;
if(!_shown)
{
ret->Width = _lastSize.width;
ret->Height = _lastSize.height;
}
else
{
auto frame = [View frame];
ret->Width = frame.size.width;
ret->Height = frame.size.height;
}
auto frame = [View frame];
ret->Width = frame.size.width;
ret->Height = frame.size.height;
return S_OK;
}
@ -332,8 +322,6 @@ public:
@try
{
_lastSize = NSSize{x,y};
if(!_shown)
{
BaseEvents->Resized(AvnSize{x,y}, reason);

Loading…
Cancel
Save