Gtk3: fixed TGtk3WidgetSet.GetRgnBox().

This commit is contained in:
zeljan1 2025-01-19 00:54:28 +01:00
parent 560a692e29
commit b329b331ff

View File

@ -2425,10 +2425,17 @@ end;
function TGtk3WidgetSet.GetRgnBox(RGN: HRGN; lpRect: PRect): Longint;
begin
Result := SIMPLEREGION;
Result := ERROR;
if IsValidGDIObject(RGN) then
begin
lpRect^ := TGtk3Region(RGN).GetExtents;
if IsRectEmpty(lpRect^) then
Result := NullRegion
else
if cairo_region_num_rectangles(TGtk3Region(RGN).Handle) > 1 then
Result := ComplexRegion
else
Result := SimpleRegion;
end;
end;