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;
end else
begin
if HandleAllocated then
Result := Screen.MonitorFromWindow(Handle, mdNearest)
if HandleAllocated then begin
// 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
Result := Screen.MonitorFromPoint(point(Left,Top));
end;