Fixes Always-on-Top crashes (#626)

This commit is contained in:
Wei (Waley) Zhang 2019-08-06 19:52:19 -07:00 committed by Pepe Rivera
parent c994e49279
commit 672e88187b

View File

@ -213,6 +213,7 @@ void ApplicationViewModel::ToggleAlwaysOnTop(float width, float height)
HandleToggleAlwaysOnTop(width, height); HandleToggleAlwaysOnTop(width, height);
} }
#pragma optimize("", off)
task<void> ApplicationViewModel::HandleToggleAlwaysOnTop(float width, float height) task<void> ApplicationViewModel::HandleToggleAlwaysOnTop(float width, float height)
{ {
if (ApplicationView::GetForCurrentView()->ViewMode == ApplicationViewMode::CompactOverlay) if (ApplicationView::GetForCurrentView()->ViewMode == ApplicationViewMode::CompactOverlay)
@ -257,7 +258,8 @@ task<void> ApplicationViewModel::HandleToggleAlwaysOnTop(float width, float heig
IsAlwaysOnTop = success; IsAlwaysOnTop = success;
} }
SetDisplayNormalAlwaysOnTopOption(); SetDisplayNormalAlwaysOnTopOption();
} };
#pragma optimize("", on)
void ApplicationViewModel::SetDisplayNormalAlwaysOnTopOption() void ApplicationViewModel::SetDisplayNormalAlwaysOnTopOption()
{ {