[Lazarus] gtk2 TCustomControl.Paint, InvalidateRect

Armin Diehl ad at ardiehl.de
Thu Jul 7 10:50:37 CEST 2011


I have tried the same under gtk1, works fine, ClipRect returns only the 
rect to be updated and not the rect of the full window. Looks like a bug 
in gtk2 since it works fine under windows and gtk1.

Any idea what i can do ?

On 07/01/2011 04:37 PM, Armin Diehl wrote:
> I have a problem with InvalidateRect with gtk2 on linux, 
> Canvas.ClipRect always returns the full area and not the rect that 
> needs to be updated. Under windows, everything works fine.
> My problem is that within a terminal emulation program i have to draw 
> a blinking cursor (250 ms) and blinking chars (500 ms). Under gtk2, 
> invalidating the area with the cursor (InvalidateRect(Handle, @rect, 
> FALSE)) does not work and my paint will always repaint the whole 
> terminal area and this causes a high cpu utilization. Under windows it 
> works fine and only the cursor or other invalid parts will be drawn 
> within paint.
> Any idea what i can do under linux gtk2 ?
>
> Thx
>
> Armin
>
>
> -- 
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus





More information about the Lazarus mailing list