win32: always call GetWindowSize in WM_SIZE handler - it already takes iconic windows into account (fixes a bug with minimizing/restoring windows and their size growing)

git-svn-id: trunk@29756 -
This commit is contained in:
paul 2011-03-09 04:04:31 +00:00
parent 66766609c8
commit 786385251f

View File

@ -2318,17 +2318,7 @@ begin
Window := Application.MainFormHandle;
end;
end;
WindowPlacement.length := SizeOf(WindowPlacement);
if IsIconic(Window) and GetWindowPlacement(Window, @WindowPlacement) then
begin
with WindowPlacement.rcNormalPosition do
begin
NewWidth := Right - Left;
NewHeight := Bottom - Top;
end;
end
else
GetWindowSize(Window, NewWidth, NewHeight);
GetWindowSize(Window, NewWidth, NewHeight);
Width := NewWidth;
Height := NewHeight;
if Assigned(lWinControl) then