mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 05:18:00 +02:00
LCL: added Application.IntfAppActivate and Application.IntfAppDeactivate, that can be called by the widgetset to notify the LCL, so it can raise the Application.OnActivate and OnDeactivate events. It is used in by the win32 widgetset (issue #8043)
git-svn-id: trunk@22062 -
This commit is contained in:
parent
fa37d1f012
commit
04304dd66c
@ -1295,6 +1295,8 @@ type
|
||||
function IsShortcut(var Message: TLMKey): boolean;
|
||||
procedure IntfQueryEndSession(var Cancel : Boolean);
|
||||
procedure IntfEndSession;
|
||||
procedure IntfAppActivate;
|
||||
procedure IntfAppDeactivate;
|
||||
procedure IntfAppMinimize;
|
||||
procedure IntfAppRestore;
|
||||
procedure IntfDropFiles(const FileNames: Array of String);
|
||||
|
@ -1754,6 +1754,16 @@ begin
|
||||
FApplicationHandlers[ahtEndSession].CallNotifyEvents(Self);
|
||||
end;
|
||||
|
||||
procedure TApplication.IntfAppActivate;
|
||||
begin
|
||||
Activate;
|
||||
end;
|
||||
|
||||
procedure TApplication.IntfAppDeactivate;
|
||||
begin
|
||||
Deactivate;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
procedure TApplication.IntfQueryEndSession(var Cancel : Boolean);
|
||||
------------------------------------------------------------------------------}
|
||||
|
@ -2419,11 +2419,15 @@ begin
|
||||
begin
|
||||
//WriteLn('Restore');
|
||||
RestoreStayOnTopFlags(Window);
|
||||
if assigned(Application) then
|
||||
Application.IntfAppActivate;
|
||||
end
|
||||
else
|
||||
begin // deactivated
|
||||
//WriteLn('Remove');
|
||||
RemoveStayOnTopFlags(Window);
|
||||
if assigned(Application) then
|
||||
Application.IntfAppDeactivate;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user