Skip to content

Commit

Permalink
Fix max size on non-primary monitor with larger width
Browse files Browse the repository at this point in the history
  • Loading branch information
angelsix committed Aug 2, 2017
1 parent b29ccf9 commit 4e68158
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Source/Fasetto.Word/Window/WindowResizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -333,11 +333,21 @@ private void WmGetMinMaxInfo(System.IntPtr hwnd, System.IntPtr lParam)
// - Position
lMmi.PointMaxPosition.X = currentX;
lMmi.PointMaxPosition.Y = currentY;

//
// - Size
lMmi.PointMaxSize.X = currentWidth;
lMmi.PointMaxSize.Y = currentHeight;

// NOTE: This fixes the bug mentioned below... setting the max size to the size of the current window
// which I think is a reasonable limit for the window
//
// In future we should find a good way to detect the size request coming from a window about to
// maximize and limit this constraint to only when maximized. For now this is fine
//
lMmi.PointMaxTrackSize.X = currentWidth;
lMmi.PointMaxTrackSize.Y = currentHeight;

//
// BUG:
// NOTE: I've noticed a bug which I think is Windows itself
Expand Down

0 comments on commit 4e68158

Please sign in to comment.