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:
vincents 2009-10-07 12:10:11 +00:00
parent fa37d1f012
commit 04304dd66c
3 changed files with 16 additions and 0 deletions

View File

@ -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);

View File

@ -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);
------------------------------------------------------------------------------}

View File

@ -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;