Re: Flickering problem

Havoc Pennington (hp@redhat.com)
Mon, 25 Oct 1999 23:19:30 -0400 (EDT)


On Sun, 24 Oct 1999, Robert Sievers wrote:
>
> Take a look at bug #305,
> http://www.abisource.com/bugzilla/show_bug.cgi?id=305, and let us know if
> what you are seeing is different from this report.
>

My guess at this bug is that you aren't using Imlib or GdkRGB or anything
spiffy like that for your icons; those GNOME icons and your AbiSource logo
are not dithered or anything, they use tons of colors (which is no problem
for GNOME apps because Imlib dithers to the Imlib palette, and in
next-generation GNOME we're replacing Imlib with a GdkRGB-based solution
which does the same thing).

The best way to fix this - other than just porting to GNOME - would be to
use GdkRGB to render your icons into a GdkPixmap, then put the GdkPixmap
into GtkPixmap or whatever you're using for pixmap display. If you use the
PNG loader to get RGB data, then copy that to a pixmap, it would work
well. You need to avoid calling gdk_pixmap_create_from_xpm_d() because
that's where all those colors get allocated.

You will need to gtk_widget_push_visual(gdk_rgb_get_visual()) and
gtk_widget_push_colormap(gdk_rgb_get_cmap()) in order to ensure the
GtkPixmap's parent widget is using the GdkRGB visual/cmap because
GtkPixmap is a no-window widget.

Havoc



This archive was generated by hypermail 1.03b2.