Skip to content

Commit 38663aa

Browse files
committed
Test code for pointer pressing
1 parent 93a1b98 commit 38663aa

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/Files.App.Controls/Omnibar/Omnibar.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using Microsoft.UI.Xaml.Shapes;
99
using Microsoft.UI.Xaml.Input;
1010
using Microsoft.UI;
11+
using CommunityToolkit.WinUI;
1112

1213
namespace Files.App.Controls
1314
{
@@ -40,7 +41,7 @@ protected override void OnApplyTemplate()
4041
if (Modes is null)
4142
return;
4243

43-
// Populate the modes1
44+
// Populate the modes
4445
foreach (var mode in Modes)
4546
{
4647
// Insert a divider
@@ -66,6 +67,10 @@ protected override void OnApplyTemplate()
6667
mode.Host = _modesHostGrid;
6768
}
6869

70+
var parentElement = this.FindAscendant<FrameworkElement>()!;
71+
parentElement.GettingFocus += ParentElement_GettingFocus;
72+
parentElement.GotFocus += ParentElement_GotFocus;
73+
GettingFocus += Omnibar_GettingFocus;
6974
GotFocus += Omnibar_GotFocus;
7075
LostFocus += Omnibar_LostFocus;
7176

@@ -86,6 +91,18 @@ private void UpdateVisualStates()
8691

8792
// Events
8893

94+
private void Omnibar_GettingFocus(UIElement sender, GettingFocusEventArgs args)
95+
{
96+
}
97+
98+
private void ParentElement_GettingFocus(UIElement sender, GettingFocusEventArgs args)
99+
{
100+
}
101+
102+
private void ParentElement_GotFocus(object sender, RoutedEventArgs e)
103+
{
104+
}
105+
89106
private void Omnibar_GotFocus(object sender, RoutedEventArgs e)
90107
{
91108
_isFocused = true;

0 commit comments

Comments
 (0)