Skip to content

Commit

Permalink
fix: maximized windows redrawing on wrong monitor (#461)
Browse files Browse the repository at this point in the history
  • Loading branch information
lars-berger authored Dec 11, 2023
1 parent 4c2b898 commit d8873a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ private void SetWindowPosition(Window window)
defaultFlags |= SetWindowPosFlags.HideWindow;

if (window is MaximizedWindow)
{
defaultFlags |= SetWindowPosFlags.NoSize;
defaultFlags |= SetWindowPosFlags.NoMove;
}

// Transition display state depending on whether window will be shown/hidden.
window.DisplayState = window.DisplayState switch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private void HandleMaximizedWindow(IntPtr windowHandle)
if (restoredWindow is not TilingWindow)
{
var workspace = WorkspaceService.GetWorkspaceFromChildContainer(restoredWindow);
_bus.Invoke(new MoveContainerWithinTreeCommand(restoredWindow, workspace, false));
_bus.Invoke(new MoveContainerWithinTreeCommand(restoredWindow, workspace));
}
else
{
Expand All @@ -89,8 +89,7 @@ private void HandleMaximizedWindow(IntPtr windowHandle)
new MoveContainerWithinTreeCommand(
restoredWindow,
restoredWindow.Parent,
restoredWindow.Index,
true
restoredWindow.Index
)
);
}
Expand Down

0 comments on commit d8873a7

Please sign in to comment.