mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-16 11:29:31 +02:00
LCL: fix RectVisible so it works correct if WindowOrg was moved. Patch by Artem Izmaylov
(cherry picked from commit d6b7ffd24c
)
This commit is contained in:
parent
dc291629e5
commit
83c94aa8df
@ -1842,6 +1842,7 @@ var
|
||||
ClipRGN, RectRgn: hRGN;
|
||||
Intersection: hRGN;
|
||||
CombineResult: Integer;
|
||||
LRect: TRect;
|
||||
begin
|
||||
Result := False;
|
||||
if (ARect.Left >= ARect.Right) or
|
||||
@ -1851,7 +1852,9 @@ begin
|
||||
ClipRGN := CreateEmptyRegion;
|
||||
if GetClipRGN(DC, ClipRGN) > 0 then
|
||||
begin
|
||||
RectRgn := CreateRectRGN(ARect.Left, ARect.Top, ARect.Right, ARect.Bottom);
|
||||
LRect := ARect;
|
||||
LPtoDP(DC, LRect, 2);
|
||||
RectRgn := CreateRectRGN(LRect.Left, LRect.Top, LRect.Right, LRect.Bottom);
|
||||
Intersection := CreateEmptyRegion;
|
||||
//debugln(['TWidgetSet.RectVisible ARect=',dbgs(ARect)]);
|
||||
CombineResult := CombineRGN(Intersection, RectRGN, ClipRGN, RGN_AND);
|
||||
|
Loading…
Reference in New Issue
Block a user