mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 13:59:31 +02:00
lcl: fixed TCustomForm.GetMonitor when handleallocated and visible
This commit is contained in:
parent
46e5442514
commit
becdd42b6d
@ -2387,6 +2387,7 @@ function TCustomForm.GetMonitor: TMonitor;
|
||||
var
|
||||
ParentForm: TCustomForm;
|
||||
begin
|
||||
Result:=nil;
|
||||
if Assigned(Parent) then
|
||||
begin
|
||||
ParentForm := GetParentForm(Self);
|
||||
@ -2434,7 +2435,8 @@ begin
|
||||
TWSWinControlClass(WidgetSetClass).SetBounds(Self, Left, Top, Width, Height);
|
||||
Result := Screen.MonitorFromWindow(Handle, mdNearest);
|
||||
{$ENDIF}
|
||||
end;
|
||||
end else
|
||||
Result := Screen.MonitorFromWindow(Handle, mdNearest);
|
||||
end
|
||||
else
|
||||
Result := Screen.MonitorFromPoint(point(Left,Top));
|
||||
|
Loading…
Reference in New Issue
Block a user