[maemo-developers] [maemo-developers] Irrelevant comparisons (was Re: testing pango with 770)

From: Lassi Syrjälä lassis at cc.jyu.fi
Date: Wed Dec 28 22:05:31 EET 2005
Hi,

Eero Tamminen kirjoitti 28.12.2005 kello 17.10:
>>
>> Hmm, yep it flickers but on the other side resizing windows or
>> sub-windows is incredible slow with GTK2.
>
> I think this might be due to high amount of signaling, especially
> with deep widget hierarchies.

I think it's mostly because of how gtk+ handles size allocations. By  
default, when a widget's size changes, all of it is redrawn. In other  
words, an "expose-event" covering whole of the widget's area is  
generated whenever there's a "size-allocate" event. And there's  
plenty of such events, when you slowly resize the toplevel window...

There's a GTK_REDRAW_ON_ALLOC flag (defaulting to TRUE) in GtkWidget.  
Some stock widgets, such as GtkTreeView and GtkTextView unset the  
flag and take care of invalidating areas that need to be redrawn, and  
therefore resize more smoothly. But chances are there are many custom  
widget implementations that rely on the sub-optimal default  
behavior... I am not sure if that should be blamed on the toolkit,  
though.

BR,
Lassi

More information about the maemo-developers mailing list