[Lazarus] gtk2 TCustomControl.Paint, InvalidateRect

Armin Diehl ad at ardiehl.de
Fri Jul 1 16:37:22 CEST 2011


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





More information about the Lazarus mailing list