Reputation: 321
In case of Gtk3, I used the function gtk_widget_get_parent_window
to get the parent window from the child widget. But this function is not available in Gtk4. How to get parent window from a child widget in Gtk4?
Upvotes: 2
Views: 80
Reputation: 1020
The corresponding function in GTK4 is:
GtkWidget*
gtk_widget_get_parent (
GtkWidget* widget
)
In Gtk4, the meaning of the GtkWidget has been increased overall. Thus, a window should always be created as a GtkWidget, so that you can then easily convert it for the corresponding functions with GTK_WIDGET(...). Greetings
Upvotes: 1