From 6a48fbc6da7adcaf2978117a0077e961ddf93fb7 Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Fri, 14 Aug 2026 19:19:41 -0500 Subject: [PATCH] Fix positioning on mixed DPI in shell mode When a secondary display has a different DPI, the initial position was not correct. AppBar logic doesn't run when in shell mode. --- src/ManagedShell.AppBar/AppBarWindow.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ManagedShell.AppBar/AppBarWindow.cs b/src/ManagedShell.AppBar/AppBarWindow.cs index daaab462..4c945459 100644 --- a/src/ManagedShell.AppBar/AppBarWindow.cs +++ b/src/ManagedShell.AppBar/AppBarWindow.cs @@ -569,7 +569,7 @@ protected virtual IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lPa // if we are opening, we're getting this message as a result of positioning // if we are an AppBar, that code will fix our position, so skip in that case to prevent infinite resizing. - if (!IsOpening || AppBarMode != AppBarMode.Normal) + if (!IsOpening || AppBarMode != AppBarMode.Normal || EnvironmentHelper.IsAppRunningAsShell) { ProcessScreenChange(ScreenSetupReason.DpiChange); }