@@ -47,21 +47,6 @@ namespace winrt::DrawingIslandComponents::implementation
4747 // Just adding EnqueueFromBackgroundThread method for testing.
4848 EnqueueFromBackgroundThread ();
4949
50- #if FALSE
51- // Get notifications for island disconnection.
52- (void )m_island.Connected (
53- [&](auto && ...)
54- {
55- return Island_OnConnected ();
56- });
57-
58- (void )m_island.Disconnected (
59- [&](auto && ...)
60- {
61- return Island_OnDisconnected ();
62- });
63- #endif
64-
6550 (void )m_island.Closed (
6651 [&]()
6752 {
@@ -74,13 +59,8 @@ namespace winrt::DrawingIslandComponents::implementation
7459
7560 DrawingIsland::~DrawingIsland ()
7661 {
77- #if FALSE
78- m_siteBridge = nullptr ;
79- #endif
80- #if TRUE
8162 m_fragmentRoot = nullptr ;
8263 m_fragmentFactory = nullptr ;
83- #endif
8464 m_compositor = nullptr ;
8565 }
8666
@@ -96,6 +76,7 @@ namespace winrt::DrawingIslandComponents::implementation
9676 m_backgroundBrushC = nullptr ;
9777 m_backgroundVisual = nullptr ;
9878
79+ // TODO: Enable Mica on Win 11
9980#if FALSE
10081 // Destroy SystemBackdropController objects.
10182 if (m_backdropController != nullptr )
@@ -149,6 +130,7 @@ namespace winrt::DrawingIslandComponents::implementation
149130 updateThread1.join ();
150131 }
151132
133+
152134 IFACEMETHODIMP
153135 DrawingIsland::OnDirectMessage (
154136 IInputPreTranslateKeyboardSourceInterop* /* source*/ ,
@@ -175,6 +157,7 @@ namespace winrt::DrawingIslandComponents::implementation
175157 return S_OK;
176158 }
177159
160+
178161 IFACEMETHODIMP
179162 DrawingIsland::OnTreeMessage (
180163 IInputPreTranslateKeyboardSourceInterop* /* source*/ ,
@@ -240,6 +223,7 @@ namespace winrt::DrawingIslandComponents::implementation
240223 }
241224 }
242225
226+
243227 void
244228 DrawingIsland::Input_Initialize ()
245229 {
@@ -445,7 +429,6 @@ namespace winrt::DrawingIslandComponents::implementation
445429 }
446430
447431
448- #if TRUE
449432 void
450433 DrawingIsland::Accessibility_Initialize ()
451434 {
@@ -454,25 +437,6 @@ namespace winrt::DrawingIslandComponents::implementation
454437
455438 m_fragmentFactory = winrt::make_self<NodeSimpleFragmentFactory>();
456439
457- #if FALSE
458- if (m_crossProcUIA)
459- {
460- m_fragmentRoot->SetName (L" CrossProc Island" );
461- }
462- else if (m_siteBridge != nullptr )
463- {
464- auto desktopChildBridge = m_siteBridge.try_as <winrt::IDesktopChildSiteBridge>();
465- if (desktopChildBridge != nullptr )
466- {
467- m_fragmentRoot->SetName (L" Child Island" );
468- }
469- else
470- {
471- m_fragmentRoot->SetName (L" Popup Island" );
472- }
473- }
474- #endif
475-
476440 (void )m_island.AutomationProviderRequested ({ this , &DrawingIsland::Accessibility_OnAutomationProviderRequested });
477441 }
478442
@@ -488,7 +452,6 @@ namespace winrt::DrawingIslandComponents::implementation
488452
489453 args.Handled (true );
490454 }
491- #endif
492455
493456
494457 winrt::Visual
@@ -514,8 +477,6 @@ namespace winrt::DrawingIslandComponents::implementation
514477 }
515478
516479
517- // Continue converting to inspect CTRL key.
518-
519480 void
520481 DrawingIsland::Input_OnLeftButtonPressed (
521482 const winrt::PointerEventArgs& args)
@@ -533,12 +494,14 @@ namespace winrt::DrawingIslandComponents::implementation
533494 }
534495 }
535496
497+
536498 void
537499 DrawingIsland::Input_OnPointerReleased ()
538500 {
539501 m_selectedVisual = nullptr ;
540502 }
541503
504+
542505 void
543506 DrawingIsland::LeftClickAndRelease (
544507 const float2 currentPoint)
@@ -547,6 +510,7 @@ namespace winrt::DrawingIslandComponents::implementation
547510 Input_OnPointerReleased ();
548511 }
549512
513+
550514 void
551515 DrawingIsland::RightClickAndRelease (
552516 const float2 currentPoint)
@@ -555,6 +519,7 @@ namespace winrt::DrawingIslandComponents::implementation
555519 Input_OnPointerReleased ();
556520 }
557521
522+
558523 void
559524 DrawingIsland::OnLeftClick (
560525 const float2 point,
@@ -578,17 +543,6 @@ namespace winrt::DrawingIslandComponents::implementation
578543 {
579544 Output_AddVisual (point, controlPressed);
580545 }
581-
582- #if FALSE
583- // Only transfer focus when we are hosted inside a DesktopChildSiteBridge. When we are
584- // hosted inside a PopupWindowSiteBridge, we expect to control focus and activaton by
585- // setting InputPointerSource->ActivationBehavior.
586- auto desktopChildBridge = m_siteBridge.try_as <winrt::IDesktopChildSiteBridge>();
587- if (desktopChildBridge != nullptr )
588- {
589- m_focusController.TrySetFocus ();
590- }
591- #endif
592546 }
593547
594548
@@ -633,13 +587,6 @@ namespace winrt::DrawingIslandComponents::implementation
633587 Output_UpdateCurrentColorVisual ();
634588 }
635589
636- #if FALSE
637- void
638- DrawingIsland::Island_OnConnected ()
639- {
640- SetLayoutDirectionForVisuals ();
641- }
642- #endif
643590
644591 void
645592 DrawingIsland::SetLayoutDirectionForVisuals ()
@@ -660,20 +607,14 @@ namespace winrt::DrawingIslandComponents::implementation
660607 m_prevLayout = m_island.LayoutDirection ();
661608 }
662609
663- #if FALSE
664- void
665- DrawingIsland::Island_OnDisconnected ()
666- {
667-
668- }
669- #endif
670610
671611 void
672612 DrawingIsland::Island_OnClosed ()
673613 {
674614
675615 }
676616
617+
677618 void
678619 DrawingIsland::Output_Initialize ()
679620 {
@@ -720,15 +661,12 @@ namespace winrt::DrawingIslandComponents::implementation
720661 m_offset.x = -BlockSize / 2 .0f ;
721662 m_offset.y = -BlockSize / 2 .0f ;
722663
723- #if TRUE
724664 CreateUIAProviderForVisual ();
725665
726666 Accessibility_UpdateScreenCoordinates (m_selectedVisual);
727- #endif
728667 }
729668
730669
731- #if TRUE
732670 void
733671 DrawingIsland::Accessibility_UpdateScreenCoordinates (
734672 const winrt::Visual & visual)
@@ -769,7 +707,6 @@ namespace winrt::DrawingIslandComponents::implementation
769707 // Finally set up parent chain
770708 fragment->SetParent (m_fragmentRoot);
771709 }
772- #endif
773710
774711
775712 void
@@ -781,6 +718,7 @@ namespace winrt::DrawingIslandComponents::implementation
781718 }
782719
783720
721+ // TODO: Enable Mica on Win 11
784722#if FALSE
785723 void
786724 DrawingIsland::SystemBackdrop_Initialize ()
0 commit comments