LCL: TCustomForm.MakeFullyVisible, force SetBounds to interface, before Screen.MonitorFromWindow. Issue #034692

git-svn-id: trunk@60521 -
This commit is contained in:
martin 2019-02-26 19:31:08 +00:00
parent 3d8420c410
commit b10aae8c1c

View File

@ -2399,8 +2399,12 @@ begin
Result := nil; Result := nil;
end else end else
begin begin
if HandleAllocated then if HandleAllocated then begin
Result := Screen.MonitorFromWindow(Handle, mdNearest) // ensure widgetset has latest coordinates // invisible forms are not updated by DoSendBoundsToInterface
if (not HandleObjectShouldBeVisible) then
TWSWinControlClass(WidgetSetClass).SetBounds(Self, Left, Top, Width, Height);
Result := Screen.MonitorFromWindow(Handle, mdNearest);
end
else else
Result := Screen.MonitorFromPoint(point(Left,Top)); Result := Screen.MonitorFromPoint(point(Left,Top));
end; end;