From a779db57f451593ae3b6b6b3457049911dcaf4af Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Thu, 16 Apr 2020 16:57:47 -0400 Subject: [PATCH] Don't shutdown the app when it's suspended. --- support/hololens/ServoApp/App.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/support/hololens/ServoApp/App.cpp b/support/hololens/ServoApp/App.cpp index a505da34d5a..22b6f4586f4 100644 --- a/support/hololens/ServoApp/App.cpp +++ b/support/hololens/ServoApp/App.cpp @@ -103,10 +103,14 @@ void App::OnActivated(IActivatedEventArgs const &args) { } void App::OnSuspending(IInspectable const &, SuspendingEventArgs const &) { - auto content = Window::Current().Content(); + // FIXME: Apps can be suspended for various reasons, not just closing them. + // * Figure out how to save state like the current URL so it can be + // restored if necessary. + // * Determine if the user has actually closed the app and shutdown. + /*auto content = Window::Current().Content(); Frame rootFrame = content.try_as(); auto page = rootFrame.Content().try_as(); - page->Shutdown(); + page->Shutdown();*/ } void App::OnNavigationFailed(IInspectable const &,