Re: removing draw method patch
- From: Alexander Larsson <alla lysator liu se>
- To: Alexander Larsson <alla lysator liu se>
- Cc: Havoc Pennington <hp redhat com>, gtk-devel-list gnome org
- Subject: Re: removing draw method patch
- Date: Mon, 4 Dec 2000 14:54:14 +0100 (CET)
On Mon, 4 Dec 2000, Alexander Larsson wrote:
> 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.
Also, you apparently missed this one, in gtk_tooltips_force_window():
gtk_signal_connect_object (GTK_OBJECT (tooltips->tip_window),
"draw",
GTK_SIGNAL_FUNC
(gtk_tooltips_paint_window),
GTK_OBJECT (tooltips));
And, from a quick grep:
gtkcolorsel.c: gtk_signal_connect (GTK_OBJECT (retval), "draw", palette_draw, colorsel);
gtkdnd.c: gtk_signal_connect_after (GTK_OBJECT (widget), "draw",
/ Alex
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]