@@ -47,21 +47,6 @@ namespace winrt::DrawingIslandComponents::implementation
47
47
// Just adding EnqueueFromBackgroundThread method for testing.
48
48
EnqueueFromBackgroundThread ();
49
49
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
-
65
50
(void )m_island.Closed (
66
51
[&]()
67
52
{
@@ -74,13 +59,8 @@ namespace winrt::DrawingIslandComponents::implementation
74
59
75
60
DrawingIsland::~DrawingIsland ()
76
61
{
77
- #if FALSE
78
- m_siteBridge = nullptr ;
79
- #endif
80
- #if TRUE
81
62
m_fragmentRoot = nullptr ;
82
63
m_fragmentFactory = nullptr ;
83
- #endif
84
64
m_compositor = nullptr ;
85
65
}
86
66
@@ -96,6 +76,7 @@ namespace winrt::DrawingIslandComponents::implementation
96
76
m_backgroundBrushC = nullptr ;
97
77
m_backgroundVisual = nullptr ;
98
78
79
+ // TODO: Enable Mica on Win 11
99
80
#if FALSE
100
81
// Destroy SystemBackdropController objects.
101
82
if (m_backdropController != nullptr )
@@ -149,6 +130,7 @@ namespace winrt::DrawingIslandComponents::implementation
149
130
updateThread1.join ();
150
131
}
151
132
133
+
152
134
IFACEMETHODIMP
153
135
DrawingIsland::OnDirectMessage (
154
136
IInputPreTranslateKeyboardSourceInterop* /* source*/ ,
@@ -175,6 +157,7 @@ namespace winrt::DrawingIslandComponents::implementation
175
157
return S_OK;
176
158
}
177
159
160
+
178
161
IFACEMETHODIMP
179
162
DrawingIsland::OnTreeMessage (
180
163
IInputPreTranslateKeyboardSourceInterop* /* source*/ ,
@@ -240,6 +223,7 @@ namespace winrt::DrawingIslandComponents::implementation
240
223
}
241
224
}
242
225
226
+
243
227
void
244
228
DrawingIsland::Input_Initialize ()
245
229
{
@@ -445,7 +429,6 @@ namespace winrt::DrawingIslandComponents::implementation
445
429
}
446
430
447
431
448
- #if TRUE
449
432
void
450
433
DrawingIsland::Accessibility_Initialize ()
451
434
{
@@ -454,25 +437,6 @@ namespace winrt::DrawingIslandComponents::implementation
454
437
455
438
m_fragmentFactory = winrt::make_self<NodeSimpleFragmentFactory>();
456
439
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
-
476
440
(void )m_island.AutomationProviderRequested ({ this , &DrawingIsland::Accessibility_OnAutomationProviderRequested });
477
441
}
478
442
@@ -488,7 +452,6 @@ namespace winrt::DrawingIslandComponents::implementation
488
452
489
453
args.Handled (true );
490
454
}
491
- #endif
492
455
493
456
494
457
winrt::Visual
@@ -514,8 +477,6 @@ namespace winrt::DrawingIslandComponents::implementation
514
477
}
515
478
516
479
517
- // Continue converting to inspect CTRL key.
518
-
519
480
void
520
481
DrawingIsland::Input_OnLeftButtonPressed (
521
482
const winrt::PointerEventArgs& args)
@@ -533,12 +494,14 @@ namespace winrt::DrawingIslandComponents::implementation
533
494
}
534
495
}
535
496
497
+
536
498
void
537
499
DrawingIsland::Input_OnPointerReleased ()
538
500
{
539
501
m_selectedVisual = nullptr ;
540
502
}
541
503
504
+
542
505
void
543
506
DrawingIsland::LeftClickAndRelease (
544
507
const float2 currentPoint)
@@ -547,6 +510,7 @@ namespace winrt::DrawingIslandComponents::implementation
547
510
Input_OnPointerReleased ();
548
511
}
549
512
513
+
550
514
void
551
515
DrawingIsland::RightClickAndRelease (
552
516
const float2 currentPoint)
@@ -555,6 +519,7 @@ namespace winrt::DrawingIslandComponents::implementation
555
519
Input_OnPointerReleased ();
556
520
}
557
521
522
+
558
523
void
559
524
DrawingIsland::OnLeftClick (
560
525
const float2 point,
@@ -578,17 +543,6 @@ namespace winrt::DrawingIslandComponents::implementation
578
543
{
579
544
Output_AddVisual (point, controlPressed);
580
545
}
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
592
546
}
593
547
594
548
@@ -633,13 +587,6 @@ namespace winrt::DrawingIslandComponents::implementation
633
587
Output_UpdateCurrentColorVisual ();
634
588
}
635
589
636
- #if FALSE
637
- void
638
- DrawingIsland::Island_OnConnected ()
639
- {
640
- SetLayoutDirectionForVisuals ();
641
- }
642
- #endif
643
590
644
591
void
645
592
DrawingIsland::SetLayoutDirectionForVisuals ()
@@ -660,20 +607,14 @@ namespace winrt::DrawingIslandComponents::implementation
660
607
m_prevLayout = m_island.LayoutDirection ();
661
608
}
662
609
663
- #if FALSE
664
- void
665
- DrawingIsland::Island_OnDisconnected ()
666
- {
667
-
668
- }
669
- #endif
670
610
671
611
void
672
612
DrawingIsland::Island_OnClosed ()
673
613
{
674
614
675
615
}
676
616
617
+
677
618
void
678
619
DrawingIsland::Output_Initialize ()
679
620
{
@@ -720,15 +661,12 @@ namespace winrt::DrawingIslandComponents::implementation
720
661
m_offset.x = -BlockSize / 2 .0f ;
721
662
m_offset.y = -BlockSize / 2 .0f ;
722
663
723
- #if TRUE
724
664
CreateUIAProviderForVisual ();
725
665
726
666
Accessibility_UpdateScreenCoordinates (m_selectedVisual);
727
- #endif
728
667
}
729
668
730
669
731
- #if TRUE
732
670
void
733
671
DrawingIsland::Accessibility_UpdateScreenCoordinates (
734
672
const winrt::Visual & visual)
@@ -769,7 +707,6 @@ namespace winrt::DrawingIslandComponents::implementation
769
707
// Finally set up parent chain
770
708
fragment->SetParent (m_fragmentRoot);
771
709
}
772
- #endif
773
710
774
711
775
712
void
@@ -781,6 +718,7 @@ namespace winrt::DrawingIslandComponents::implementation
781
718
}
782
719
783
720
721
+ // TODO: Enable Mica on Win 11
784
722
#if FALSE
785
723
void
786
724
DrawingIsland::SystemBackdrop_Initialize ()
0 commit comments