win32: group a condition and write a comment why it is needed

git-svn-id: trunk@42111 -
This commit is contained in:
paul 2013-07-17 03:40:29 +00:00
parent e3926122ff
commit 5a5a3e4448

View File

@ -2354,14 +2354,16 @@ begin
begin
Msg := LM_SIZE;
SizeType := WParam or Size_SourceIsInterface;
if Window = Win32WidgetSet.AppHandle then
// this is needed since we don't minimize the main form window
// we only hide and show it back on mimize and restore in case MainFormOnTaskbar = False
if (Window = Win32WidgetSet.AppHandle) and
Assigned(Application.MainForm) and Application.MainForm.HandleAllocated
begin
if Assigned(Application.MainForm) and Application.MainForm.HandleAllocated then
begin
lWinControl := Application.MainForm;
Window := Application.MainFormHandle;
end;
lWinControl := Application.MainForm;
Window := Application.MainFormHandle;
end;
GetWindowSize(Window, NewWidth, NewHeight);
Width := NewWidth;
Height := NewHeight;