Re: removing draw method patch



On 3 Dec 2000, Havoc Pennington wrote:

> 
> Hi,
> 
> I have a patch to remove the "draw" method from GtkWidget. The only
> newly-written code this involved was:
> 
> void
> gtk_widget_draw (GtkWidget    *widget,
>                  GdkRectangle *area)
> {
>   g_return_if_fail (widget != NULL);
>   g_return_if_fail (GTK_IS_WIDGET (widget));
> 
>   if (GTK_WIDGET_DRAWABLE (widget))
>     {
>       if (area)
>         gtk_widget_queue_draw_area (widget,
>                                     area->x, area->y,
>                                     area->width, area->height);
>       else
>         gtk_widget_queue_draw (widget);
> 
>       gdk_window_process_updates (widget->window, TRUE);
>     }
> }
> 
> The rest of the patch is just deleting all the draw methods from all
> the widgets, so I'll save bandwidth.
> 
> If no one sees bugs in gtk_widget_draw() there, I'll commit the patch
> shortly.

This patch introduces a bug in GtkList.

gtk_list_item_expose() calls gtk_widget_draw_focus() which ends up in
gtk_list_item_draw_focus() doing gtk_widget_draw(widget, NULL). This
exposes the widget again, and it loops until the stack is full.

/ Alex






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