Skip to content

Commit 929cd01

Browse files
committed
Revert "Merge branch 'user/jessecol/calc-app-compactoverlay' of https://github.com/microsoft/WindowsAppSDK-Samples into user/jessecol/calc-app-compactoverlay"
This reverts commit 5d3b8c0, reversing changes made to 41c6b9c.
1 parent 5d3b8c0 commit 929cd01

31 files changed

+1464
-769
lines changed

Samples/Islands/DrawingIsland/DrawingCppTestApp/WinMain.cpp

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,30 +21,25 @@ int __stdcall wWinMain(HINSTANCE, HINSTANCE, PWSTR, int)
2121
auto controller{ winrt::DispatcherQueueController::CreateOnCurrentThread() };
2222
auto queue = controller.DispatcherQueue();
2323

24-
auto compositor = winrt::Compositor();
25-
auto island = winrt::DrawingIsland(compositor).Island();
26-
27-
// Associating the AppWindow with the DispatcherQueue on which the ContentIsland is created
28-
// will ensure that the ContentIsland is Closed when the AppWindow closes.
2924
auto window = winrt::AppWindow::Create();
3025
window.AssociateWithDispatcherQueue(queue);
31-
window.Closing(
32-
[queue](auto&&, auto&&)
26+
window.Closing([&](auto&&, auto&&)
3327
{
34-
// Ensure the DispatcherQueue exits the event loop on close.
3528
queue.EnqueueEventLoopExit();
3629
});
3730

3831
window.Title(L"Drawing C++ TestApp");
3932
window.Show();
4033

41-
// Create a ContentSiteBridge and connect the ContentIsland to it.
34+
auto compositor = winrt::Compositor();
35+
auto drawing = winrt::DrawingIsland(compositor);
36+
4237
auto siteBridge = winrt::DesktopChildSiteBridge::Create(compositor, window.Id());
4338
siteBridge.ResizePolicy(winrt::ContentSizePolicy::ResizeContentToParentWindow);
4439
siteBridge.Show();
45-
siteBridge.Connect(island);
40+
siteBridge.Connect(drawing.Island());
4641

47-
// Move initial focus to the ContentIsland.
42+
// Move initial focus to the island.
4843
auto focusNavigationHost = winrt::InputFocusNavigationHost::GetForSiteBridge(siteBridge);
4944
focusNavigationHost.NavigateFocus(winrt::FocusNavigationRequest::Create(
5045
winrt::FocusNavigationReason::Programmatic));
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)