win32: fix modal form showing when stay on top forms are visible (bug #0015636)

git-svn-id: trunk@25138 -
This commit is contained in:
paul 2010-05-02 16:59:54 +00:00
parent db1ba90fac
commit 6cbcdb2b75
3 changed files with 8 additions and 0 deletions

View File

@ -326,6 +326,7 @@ function TScreen.DisableForms(SkipForm: TCustomForm; DisabledList: TList = nil):
var var
i: integer; i: integer;
AForm: TCustomForm; AForm: TCustomForm;
AppHandle: HWND;
begin begin
Result := DisabledList; Result := DisabledList;
if Result = nil then if Result = nil then
@ -345,6 +346,8 @@ begin
end; end;
end; end;
end; end;
if WidgetSet.GetLCLCapability(lcApplicationWindow) = LCL_CAPABILITY_YES then
EnableWindow(WidgetSet.AppHandle, False);
end; end;
{ {
@ -355,7 +358,10 @@ procedure TScreen.EnableForms(var AFormList: TList);
var var
i: integer; i: integer;
AForm: TCustomForm; AForm: TCustomForm;
AppHandle: HWND;
begin begin
if WidgetSet.GetLCLCapability(lcApplicationWindow) = LCL_CAPABILITY_YES then
EnableWindow(WidgetSet.AppHandle, True);
if AFormList = nil then if AFormList = nil then
Exit; Exit;
for i := AFormList.Count - 1 downto 0 do for i := AFormList.Count - 1 downto 0 do

View File

@ -74,6 +74,7 @@ type
lcNeedMininimizeAppWithMainForm, lcNeedMininimizeAppWithMainForm,
// When main form is minimized, then minimize also app // When main form is minimized, then minimize also app
lcApplicationTitle, // Can change application title in runtime lcApplicationTitle, // Can change application title in runtime
lcApplicationWindow, // Application has a special root window
lcFormIcon, // Forms have icon lcFormIcon, // Forms have icon
lcModalWindow, // native modal windows support lcModalWindow, // native modal windows support
lcDragDockStartOnTitleClick // ability to start drag/dock events on title bar click lcDragDockStartOnTitleClick // ability to start drag/dock events on title bar click

View File

@ -532,6 +532,7 @@ begin
lcAsyncProcess: Result := LCL_CAPABILITY_YES; lcAsyncProcess: Result := LCL_CAPABILITY_YES;
lcModalWindow: Result := LCL_CAPABILITY_NO; lcModalWindow: Result := LCL_CAPABILITY_NO;
lcDragDockStartOnTitleClick: Result := LCL_CAPABILITY_YES; lcDragDockStartOnTitleClick: Result := LCL_CAPABILITY_YES;
lcApplicationWindow: Result := LCL_CAPABILITY_YES;
else else
Result := inherited; Result := inherited;
end; end;