Reply
Thread Tools
bonapart's Avatar
Posts: 565 | Thanked: 816 times | Joined on Sep 2010 @ Nevinnomyssk
#1
i have GTK+ window
HildonAnimationActor *actor;
GtkWidget *window, *drawing;
window = hildon_stackable_window_new ();
gtk_widget_realize (window);
gtk_window_fullscreen (GTK_WINDOW(window));
actor = HILDON_ANIMATION_ACTOR (hildon_animation_actor_new());
hildon_animation_actor_set_parent (actor, GTK_WINDOW (window));
drawing = gtk_image_new ();
gtk_container_add (GTK_CONTAINER (actor), drawing);
all looks good (window created,showed and so on). but when i try to get XID (to create EGL surface)

XID winxid=GDK_WINDOW_XID((GdkDrawable*)(drawing));
winxid is zero
what's can be wrong?
 
Posts: 235 | Thanked: 339 times | Joined on Nov 2010
#2
I think "drawing" is not a GdkWindow; after realising it, you should call gtk_widget_get_window on it and use the XID macro on that
 

The Following User Says Thank You to jstokes For This Useful Post:
Posts: 56 | Thanked: 31 times | Joined on Jul 2008 @ Austria
#3
realize the image.
Then:
XID winxid=GDK_WINDOW_XID(GTK_WIDGET(drawing)->window);

Note that GdkWindow is not the same as GtkWindow.
 

The Following User Says Thank You to dannym For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 20:19.