Skip to content

Commit 06e379e

Browse files
authored
Fix the window that flashed by (#254)
1 parent 105d7c5 commit 06e379e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/WinUIEx/TrayIcon.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,9 @@ private void ShowFlyout(FlyoutBase flyout)
180180
_currentFlyout = flyout;
181181
var grid = ((Microsoft.UI.Xaml.Controls.Grid)_window.Content);
182182
grid.ContextFlyout = flyout;
183+
_window.AppWindow.MoveAndResize(new Windows.Graphics.RectInt32(location.X, location.Y, 0, 0), Microsoft.UI.Windowing.DisplayArea.GetFromPoint(new Windows.Graphics.PointInt32(0, 0), Microsoft.UI.Windowing.DisplayAreaFallback.Primary));
183184
_window.Activate();
184185
_window.Show();
185-
_window.AppWindow.MoveAndResize(new Windows.Graphics.RectInt32(location.X, location.Y, 0, 0), Microsoft.UI.Windowing.DisplayArea.GetFromPoint(new Windows.Graphics.PointInt32(0, 0), Microsoft.UI.Windowing.DisplayAreaFallback.Primary));
186186
WindowExtensions.SetForegroundWindow(_window);
187187
double w = (location.Width - location.X) / grid.XamlRoot.RasterizationScale;
188188
double h = (location.Height - location.Y) / grid.XamlRoot.RasterizationScale;

0 commit comments

Comments
 (0)