Hi,

>From the gtkmm documentation (just a wrapper for gtk):
"""
void Gtk::Widget::show ( )
Flags a widget to be displayed.
"""

ie. it doesn't acually show the widget, but tells gtk you'd like it to (wich
it will do for you, a short time later)
I'm guessing the widget hasn't had time to get realized before you do your
colormap stuff

Since your code should be called after realization, you could put it
in the on_realize() handler [or
rather, connect your code to the realize signal in C (as opposed to C++)]

If you are calling this code a long time later (eg. on pressing a
button) then I guess the problem's elsewere.

Hoping to help,
Jonathan

On 3/27/07, 3saul <[EMAIL PROTECTED]> wrote:
>
>
> I'm doing it to get transparency for the window. The strange thing is is
> that
> the window is in fact shown (realized) using gtk_widget_show before I call
> the colormap stuff. I've managed to get this working using straight C but
> I'm now creating a gui using libglade. Any idea's what I need to do in
> libglade to get this working?
>
>
>
> Paul Pogonyshev wrote:
> >
> > 3saul wrote:
> >>
> >> when trying to:
> >>
> >> GdkColormap *colormap = gdk_screen_get_rgba_colormap(screen);
> >> gtk_widget_set_colormap(widget, colormap);
> >>
> >> This is literally as complicated as my program is. Create a window
> (using
> >> libglade), setup callbacks, apply colormap.
> >>
> >> What does this mean? Is there a web page somewhere with an explanation
> of
> >> such errors?
> >> The full error message is:
> >>
> >> Gtk-Critical **: gtk_widget_set_colormap: assertion
> '!GTK_WIDGET_REALIZED
> >> (widget)' failed
> >
> > It means what it says, that the widget is not realized.  I.e. it is not
> > shown on screen and you cannot set colormap until it is.  Why do you
> need
> > it anyway?  AFAIK colormaps are handled by GTK+ itself just fine.
> >
> > Paul
> > _______________________________________________
> > gtk-app-devel-list mailing list
> > gtk-app-devel-list@gnome.org
> > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/gtk-errors-%22%21GTK_WIDGET_REALIZED-%28widget%29-failed-tf3460522.html#a9688570
> Sent from the Gtk+ - Apps Dev mailing list archive at Nabble.com.
>
> _______________________________________________
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
>
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to