Skip to content

Commit

Permalink
Merge pull request #416 from moellerm/Issue_226
Browse files Browse the repository at this point in the history
Issue #226: Restore floating windows to maximized state
  • Loading branch information
Dirkster99 authored Jan 29, 2023
2 parents e9b337d + df8109c commit fd7b4b0
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,21 @@ private set
protected override void OnStateChanged(EventArgs e)
{
if (!_isInternalChange)
UpdateMaximizedState(WindowState == WindowState.Maximized);
{
if (WindowState == WindowState.Maximized)
{
// Forward external changes to WindowState from any state to a new Maximized state
// to the LayoutFloatingWindowControl internal representation.
UpdateMaximizedState(true);
}
else if (IsMaximized && OwnedByDockingManagerWindow)
{
// Override any external changes to WindowState when owned and in Maximized state.
// This override fixes the issue of an owned LayoutFloatingWindowControl loosing
// its Maximized state when the owner window is restored from a Minimized state.
WindowState = WindowState.Maximized;
}
}

base.OnStateChanged(e);
}
Expand Down

0 comments on commit fd7b4b0

Please # to comment.