-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello everybody.

I'm trying to implement a GTK widget (a sort of GtkIconView) using
Clutter, so to maintain an exposed API similar to the original widget
but using this library to perform some sweet effect. The Clutter canvas
would be used as effective area where to render animated icons.

I've this problem: in the realize() callback I create the gtk_clutter
and try to show, but it is rendered outside the area of the widget, in a
separated window.
This is the piece of code:


[ ... ]

widget->window = gdk_window_new(gtk_widget_get_parent_window(widget),
                                &attributes,attributes_mask);

[ ... ]

icon_view->priv->inner_window = gtk_clutter_new ();
gtk_widget_set_parent ( icon_view->priv->inner_window, widget );
gdk_window_reparent(icon_view->priv->inner_window->window,widget->window,0,0);

gdk_window_move_resize ( icon_view->priv->inner_window->window, 0, 0,
                MAX(icon_view->priv->width,widget->allocation.width),
                MAX(icon_view->priv->height,widget->allocation.height));

icon_view->priv->stage = gtk_clutter_get_stage(
                        GTK_CLUTTER(icon_view->priv->inner_window));

color = ( gtk_widget_get_style ( widget ) )->bg [ GTK_STATE_NORMAL ];
stage_color.red = ( guint8 ) ( ( color.red / 65535.0 ) * 255 );
stage_color.green = ( guint8 ) ( ( color.green / 65535.0 ) * 255 );
stage_color.blue  = ( guint8 ) ( ( color.blue / 65535.0 ) * 255 );
clutter_stage_set_color (CLUTTER_STAGE(icon_view->priv->stage),
                                &stage_color);

icon_view->priv->bin_window = icon_view->priv->inner_window->window;
gdk_window_set_user_data (icon_view->priv->inner_window->window,widget);
clutter_actor_show_all (icon_view->priv->stage);


I've already tryed to reparent the window, to force coordinates, a lot
of different functions about windows from GDK, but nothing different
happens: always a different window is created.

Can anybody help me?

- --
+--- -- -                                                 --  ----+
|   Roberto -MadBob- Guido ---+--- bob4mail[AT]gmail.com          |
|                             +--- madbob[AT]jabber.linux.it      .
.                             |
    Step #1 in programming:   +--- http://madbob.homelinux.com    |
|      understand people      +--- http://lobotomy.sf.net         |
|                             +--- http://barberaware.org         |
+--- ---- -                                              -- -  ---+
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGziZh3wUck/os3BkRAoAMAJ90BXLF782wtvaRp8G54zN3XdrW6wCdH6a6
lk9F6OrIuT31M6SKXSPncfc=
=IAXI
-----END PGP SIGNATURE-----
-- 
To unsubscribe send a mail to [EMAIL PROTECTED]

Reply via email to