From b10aae8c1cb4bf6e317642f5b42dd316ef6ed8ca Mon Sep 17 00:00:00 2001 From: martin Date: Tue, 26 Feb 2019 19:31:08 +0000 Subject: [PATCH] LCL: TCustomForm.MakeFullyVisible, force SetBounds to interface, before Screen.MonitorFromWindow. Issue #034692 git-svn-id: trunk@60521 - --- lcl/include/customform.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lcl/include/customform.inc b/lcl/include/customform.inc index a8bff70325..ca82365852 100644 --- a/lcl/include/customform.inc +++ b/lcl/include/customform.inc @@ -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;