Re: [PATCH] gtkpixmap.c, bug in gtk_pixmap_set()



Hi Owen!

On Mon, Jun 22, 1998 at 11:07:20PM -0400, Owen Taylor wrote:

> > I'm not completely sure about this, but I think the patch simply won't work.
> > Gtk_pixmap_set should expose the area of the pixmap. The parent of the pixma
p
> > has to redraw the area, because gtk_pixmap has the GTK_NO_WINDOW flag set.
> > Now the pixmap simply clears the area of the pixmap.
>
> I don't quite understand. The Pixmap still redraws it's own area -
> the NO_WINDOW flags simply indicates that widget->window is the
> same as parent->window; i.e., that it is drawing on its parent's
> window. In this case, we simply clear the allocation when the
> needs_clear flag is set.

Yes, and I think that's not enough. It's possible that the parent or a
sibling has to draw something "under" the pixmap. If we simply clear the
area, we also clear the drawing of the parent and nobody restores it after
gdk_window_clear_area.

> > I think that's the reason, why the testgtk notebook example doesn't work
> > correctly.
>
> What doesn't work correctly about it? As far as I can see, it still
> looks fine.

Try to switch pages. The pixmap background of the old active tab is
GTK_STATE_NORMAL and should be GTK_STATE_ACTIVE.

bye,
  Lars



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