Skip to content

Commit f76dada

Browse files
committed
remvoe forced position setting
1 parent 859e267 commit f76dada

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/Windows/Avalonia.Win32/WindowImpl.cs

+3-6
Original file line numberDiff line numberDiff line change
@@ -1451,8 +1451,6 @@ private void UpdateWindowProperties(WindowProperties newProperties, bool forceCh
14511451

14521452
if (!_isFullScreenActive && ((oldProperties.Decorations != newProperties.Decorations) || forceChanges))
14531453
{
1454-
var style = GetStyle();
1455-
14561454
var margin = newProperties.Decorations == SystemDecorations.BorderOnly ? 1 : 0;
14571455

14581456
var margins = new MARGINS
@@ -1467,10 +1465,9 @@ private void UpdateWindowProperties(WindowProperties newProperties, bool forceCh
14671465

14681466
if (_shown || forceChanges)
14691467
{
1470-
GetWindowRect(_hwnd, out var rcWindow);
1471-
1472-
SetWindowPos(_hwnd, IntPtr.Zero, rcWindow.left, rcWindow.top, 0 ,0,
1473-
SetWindowPosFlags.SWP_NOZORDER | SetWindowPosFlags.SWP_NOACTIVATE | SetWindowPosFlags.SWP_NOSIZE |
1468+
SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0 ,0,
1469+
SetWindowPosFlags.SWP_NOZORDER | SetWindowPosFlags.SWP_NOACTIVATE |
1470+
SetWindowPosFlags.SWP_NOSIZE | SetWindowPosFlags.SWP_NOMOVE |
14741471
SetWindowPosFlags.SWP_FRAMECHANGED);
14751472
}
14761473
}

0 commit comments

Comments
 (0)