reversibility of ScrolledWindow set_child() and get_child()
ScrolledWindow set_child() and get_child() are not reversible (gtk_scrolled_window_set_child() can add GtkViewport as a proxy child, or not).
The snippet below can result in assertion failed: (got == child)
depending on a child widget
GtkWidget *window = gtk_scrolled_window_new();
if (GTK_IS_SCROLLED_WINDOW(window)) {
gtk_scrolled_window_set_child(GTK_SCROLLED_WINDOW(window), child);
GtkWidget *got = gtk_scrolled_window_get_child(GTK_SCROLLED_WINDOW(window));
// if ((got != child) && GTK_IS_VIEWPORT(got)) got = gtk_viewport_get_child(GTK_VIEWPORT(got)); // workaround
g_assert(got == child);
}
Edited by Volodymyr Yakovetsky