mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 10:39:18 +02:00
LCL: added flag EnableAsyncDeactivate for possible workaround for too early/many deactivate events
git-svn-id: trunk@21188 -
This commit is contained in:
parent
236c316138
commit
d4eeeafe50
@ -1174,7 +1174,7 @@ type
|
||||
const Handler: TMethod);
|
||||
procedure RunLoop;
|
||||
procedure Activate;
|
||||
procedure Deactivate(Data: PtrInt);
|
||||
procedure Deactivate(Data: PtrInt = 0);
|
||||
protected
|
||||
function GetConsoleApplication: boolean; override;
|
||||
procedure NotifyIdleHandler(var Done: Boolean);
|
||||
|
@ -463,9 +463,14 @@ end;
|
||||
procedure TCustomForm.WMDeactivate(var Message : TLMActivate);
|
||||
begin
|
||||
FActive:=false;
|
||||
{$IFDEF EnableAsyncDeactivate}
|
||||
Deactivate;
|
||||
if Application<>nil then
|
||||
Application.QueueAsyncCall(@Application.Deactivate,0);
|
||||
{$ELSE}
|
||||
if Application<>nil then Application.Deactivate;
|
||||
Deactivate;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
procedure TCustomForm.CMShowingChanged(var Message: TLMessage);
|
||||
|
Loading…
Reference in New Issue
Block a user