Re: gdk_gc_set_foreground(): not working over DirectFB



Hi,

On Mon, 2006-11-13 at 14:40 +0530, Prasanna Kumar K wrote:

> +  GdkColor color;
> +
> +  color.pixel = 0xffff0000;
> + gdk_gc_set_foreground (widget->style->fg_gc[GTK_WIDGET_STATE (widget)], &color);

You are using an unallocated color here. There's
gdk_gc_set_rgb_fg_color() for that purpose. Kalle already outlined other
issues with this code in another mail so I am not going to comment on
the fact that it is a bad idea to access the widget's style directly.


Sven





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