win32: clear all LMessages fields at the beginning of the message window proc to prevent passing wrong LParam and WParam to LCL, fill WParam and LParam in case of LM_ACTIVATE, LM_DEACTIVATE since they store new ActiveWindow and other useful data

git-svn-id: trunk@24142 -
This commit is contained in:
paul 2010-03-21 13:48:10 +00:00
parent 85eb77d20d
commit d96d0481d2

View File

@ -1030,8 +1030,7 @@ var
begin
Assert(False, 'Trace:WindowProc - Start');
LMessage.Result := 0;
LMessage.Msg := LM_NULL;
FillChar(LMessage, SizeOf(LMessage), 0);
PLMsg := @LMessage;
WinProcess := True;
NotifyUserInput := False;
@ -1120,10 +1119,14 @@ begin
WA_ACTIVE, WA_CLICKACTIVE:
begin
LMessage.Msg := LM_ACTIVATE;
LMessage.WParam := WParam;
LMessage.LParam := LParam;
end;
WA_INACTIVE:
begin
LMessage.Msg := LM_DEACTIVATE;
LMessage.WParam := WParam;
LMessage.LParam := LParam;
end;
end;
end;