Browse Source

Set actualWindowState earlier.

Previously, `_actualWindowState` was being set after the window state had finished changing, but `ExitFullScreenMode` calls `UpdateStyle` which expects `_actualWindowState` to be up-to-date, meaning that previously we ended up with an invalid size when exiting full screen mode programatically.
pull/8405/head
Steven Kirk 4 years ago
parent
commit
dfa0c44269
  1. 3
      native/Avalonia.Native/src/OSX/WindowImpl.mm

3
native/Avalonia.Native/src/OSX/WindowImpl.mm

@ -488,6 +488,8 @@ HRESULT WindowImpl::SetWindowState(AvnWindowState state) {
}
if (_shown) {
_actualWindowState = _lastWindowState;
switch (state) {
case Maximized:
if (currentState == FullScreen) {
@ -545,7 +547,6 @@ HRESULT WindowImpl::SetWindowState(AvnWindowState state) {
break;
}
_actualWindowState = _lastWindowState;
WindowEvents->WindowStateChanged(_actualWindowState);
}

Loading…
Cancel
Save