mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 04:07:57 +02:00
LCL: Don't set Parent for a standalone form. Issue #18710, patch from cobines.
git-svn-id: trunk@51974 -
This commit is contained in:
parent
b192fb9760
commit
33013ddac8
@ -660,6 +660,7 @@ type
|
||||
write FDefaultMonitor default dmActiveForm;
|
||||
property Designer: TIDesigner read FDesigner write FDesigner;
|
||||
property DesignTimeDPI: Integer read FDesignTimeDPI write FDesignTimeDPI;
|
||||
property EffectiveShowInTaskBar: TShowInTaskBar read GetEffectiveShowInTaskBar;
|
||||
property FormState: TFormState read FFormState;
|
||||
property FormStyle: TFormStyle read FFormStyle write SetFormStyle
|
||||
default fsNormal;
|
||||
|
@ -402,15 +402,19 @@ begin
|
||||
begin
|
||||
if (Parent = 0) then
|
||||
begin
|
||||
if not Application.MainFormOnTaskBar then
|
||||
Parent := Win32WidgetSet.AppHandle
|
||||
else
|
||||
if (AWinControl <> Application.MainForm) then
|
||||
// Leave Parent at 0 if this is a standalone form.
|
||||
if (lForm.EffectiveShowInTaskBar <> stAlways) then
|
||||
begin
|
||||
if Assigned(Application.MainForm) and Application.MainForm.HandleAllocated then
|
||||
Parent := Application.MainFormHandle
|
||||
if not Application.MainFormOnTaskBar then
|
||||
Parent := Win32WidgetSet.AppHandle
|
||||
else
|
||||
Parent := Win32WidgetSet.AppHandle;
|
||||
if (AWinControl <> Application.MainForm) then
|
||||
begin
|
||||
if Assigned(Application.MainForm) and Application.MainForm.HandleAllocated then
|
||||
Parent := Application.MainFormHandle
|
||||
else
|
||||
Parent := Win32WidgetSet.AppHandle;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
CalcFormWindowFlags(lForm, Flags, FlagsEx);
|
||||
|
Loading…
Reference in New Issue
Block a user