Re: How to forbid undesired redrawing of the parent?



redraws (expose events) always contain an "area" to be redrawn. the parent widget should ideally only redraw the specifiied area, especially if a full redraw is expensive. your parent needs to determine which children and which (if any) background needs to be redrawn.


On Mon, Jul 29, 2013 at 4:52 AM, Виталий Кирсанов <krokoziabla gmail com> wrote:
Hello list.

I have two custom widgets: widget A is a container, widget B is a simple widget. Both of them are window widgets. Widget A can contain a lot of instances of widget B. 

The problem is when I call gtk_widget_queue_draw() for an instance of widget B it also causes the parent widget A to get redrawn as well. Considering that the drawing widget A depends on all of it children (i.e. their positions and sizes) it can lead to quite an overhead which is not needed in this case (that is if the instance of B being redrawn doesn't change its geometry).

So, is there a way to prevent the parent window widget A from redrawing in case of one of its window children B gets redrawn?

BR, Vitaly Kirsanov
skype: vkirsan


_______________________________________________
gtk-list mailing list
gtk-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]