LCL: Use OwnerForm.Monitor when Position = poOwnerFormCenter. Issue #41377, patch by Artem Izmaylov.

This commit is contained in:
Juha 2025-01-30 18:40:35 +02:00
parent 7deaf87eb8
commit bc8578231c

View File

@ -2422,7 +2422,7 @@ begin
Result := GetDefaultMonitor; Result := GetDefaultMonitor;
poOwnerFormCenter: poOwnerFormCenter:
if (Owner is TCustomForm) and (GetParentForm(TCustomForm(Owner))<>Self) then if (Owner is TCustomForm) and (GetParentForm(TCustomForm(Owner))<>Self) then
Result := Application.MainForm.Monitor Result := TCustomForm(Owner).Monitor
else else
Result := GetDefaultMonitor; Result := GetDefaultMonitor;
else else