mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-10 20:58:37 +02:00
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:
parent
85eb77d20d
commit
d96d0481d2
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user