Gtk3: fixed loop with paint, stalled code.

This commit is contained in:
zeljan1 2025-01-25 21:31:21 +01:00
parent 16be2ec0a6
commit 5eded0d07e

View File

@ -1362,12 +1362,7 @@ begin
if Data <> nil then
begin
gdk_cairo_get_clip_rectangle(AContext, @ARect);
// DebugLn('**** Sending paint event to ',dbgsName(TGtk3Widget(Data).LCLObject),' clip ',dbgs(RectFromGdkRect(ARect)),' w=',dbgs(ARect.Width),' h=',dbgs(ARect.height));
Result := TGtk3Widget(Data).GtkEventPaint(AWidget, AContext);
// workaround for lcl painted widgets until we found why gtk3 sends wrong rect
if (TGtk3Widget(Data).FHasPaint) and
(ARect.height < (TGtk3Widget(Data).GetContainerWidget^.get_allocated_height div 4) ) then
AWidget^.queue_draw;
end;
end;