diff --git a/lcl/interfaces/gtk/gtkwidgetset.inc b/lcl/interfaces/gtk/gtkwidgetset.inc index c667d049bf..f19fc0f710 100644 --- a/lcl/interfaces/gtk/gtkwidgetset.inc +++ b/lcl/interfaces/gtk/gtkwidgetset.inc @@ -2160,7 +2160,7 @@ var end; var - R: TRect; + R, R1: TRect; UseAlpha: Boolean; begin Result := False; @@ -2182,7 +2182,8 @@ begin if ARect <> nil then begin // get intersection - IntersectRect(R, ARect^, R); + IntersectRect(R1, ARect^, R); + R := R1; ADesc.Width := R.Right - R.Left; ADesc.Height := R.Bottom - R.Top; end; @@ -2210,7 +2211,7 @@ var Pixbuf: PGdkPixbuf; pixels: pguchar; Dest: PByte; - R: TRect; + R, R1: TRect; i: Integer; SourceStride, DestStride: PtrUInt; begin @@ -2233,7 +2234,8 @@ begin if ARect <> nil then begin // get intersection - IntersectRect(R, ARect^, R); + IntersectRect(R1, ARect^, R); + R := R1; ADesc.Width := R.Right - R.Left; ADesc.Height := R.Bottom - R.Top; end;