Can you get the parent GTK window from a widget? -


i have custom widget , needs launch messagedialog , in order me put message dialog on top of window widget in need access parent gtk.window. there way parent gtk window? thanks

the gtk docs suggest:

   gtkwidget *toplevel = gtk_widget_get_toplevel (widget);    if (gtk_widget_is_toplevel (toplevel))      {        /* perform action on toplevel. */      } 

get_toplevel return topmost widget you're inside, whether or not it's window, is_toplevel check. yeah mis-named since code above "get_toplevel()" immediate "is_toplevel()" (most likely, get_toplevel() should called else).


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -