Browse Source

reduce work done on osx native side.

pull/8305/head
Dan Walmsley 4 years ago
parent
commit
33c61fdac5
  1. 17
      native/Avalonia.Native/src/OSX/WindowBaseImpl.mm

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

@ -298,14 +298,15 @@ HRESULT WindowBaseImpl::Resize(double x, double y, AvnPlatformResizeReason reaso
}
@try {
lastSize = NSSize {x, y};
if (!_shown) {
BaseEvents->Resized(AvnSize{x, y}, reason);
}
else if(Window != nullptr) {
[Window setContentSize:lastSize];
[Window invalidateShadow];
if(x != lastSize.width || y != lastSize.height) {
lastSize = NSSize{x, y};
if (!_shown) {
BaseEvents->Resized(AvnSize{x, y}, reason);
} else if (Window != nullptr) {
[Window setContentSize:lastSize];
[Window invalidateShadow];
}
}
}
@finally {

Loading…
Cancel
Save