mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 17:59:22 +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;
|
ClipRGN, RectRgn: hRGN;
|
||||||
Intersection: hRGN;
|
Intersection: hRGN;
|
||||||
CombineResult: Integer;
|
CombineResult: Integer;
|
||||||
|
LRect: TRect;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
if (ARect.Left >= ARect.Right) or
|
if (ARect.Left >= ARect.Right) or
|
||||||
@ -1851,7 +1852,9 @@ begin
|
|||||||
ClipRGN := CreateEmptyRegion;
|
ClipRGN := CreateEmptyRegion;
|
||||||
if GetClipRGN(DC, ClipRGN) > 0 then
|
if GetClipRGN(DC, ClipRGN) > 0 then
|
||||||
begin
|
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;
|
Intersection := CreateEmptyRegion;
|
||||||
//debugln(['TWidgetSet.RectVisible ARect=',dbgs(ARect)]);
|
//debugln(['TWidgetSet.RectVisible ARect=',dbgs(ARect)]);
|
||||||
CombineResult := CombineRGN(Intersection, RectRGN, ClipRGN, RGN_AND);
|
CombineResult := CombineRGN(Intersection, RectRGN, ClipRGN, RGN_AND);
|
||||||
|
Loading…
Reference in New Issue
Block a user