Skip to content

Commit

Permalink
remove forced position setting
Browse files Browse the repository at this point in the history
  • Loading branch information
emmauss committed Aug 9, 2024
1 parent 6da738b commit 0211900
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/Windows/Avalonia.Win32/WindowImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1451,8 +1451,6 @@ private void UpdateWindowProperties(WindowProperties newProperties, bool forceCh

if (!_isFullScreenActive && ((oldProperties.Decorations != newProperties.Decorations) || forceChanges))
{
var style = GetStyle();

var margin = newProperties.Decorations == SystemDecorations.BorderOnly ? 1 : 0;

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

if (_shown || forceChanges)
{
GetWindowRect(_hwnd, out var rcWindow);

SetWindowPos(_hwnd, IntPtr.Zero, rcWindow.left, rcWindow.top, 0 ,0,
SetWindowPosFlags.SWP_NOZORDER | SetWindowPosFlags.SWP_NOACTIVATE | SetWindowPosFlags.SWP_NOSIZE |
SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0 ,0,
SetWindowPosFlags.SWP_NOZORDER | SetWindowPosFlags.SWP_NOACTIVATE |
SetWindowPosFlags.SWP_NOSIZE | SetWindowPosFlags.SWP_NOMOVE |
SetWindowPosFlags.SWP_FRAMECHANGED);
}
}
Expand Down

0 comments on commit 0211900

Please sign in to comment.