Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What can I use instead of gtk_container_set_focus_chain()?

Tags:

gtk

gtk3

The gtk_container_set_focus_chain() function deprecated since GTK 3.24. What can I use instead of?

like image 547
urandom0 Avatar asked Sep 17 '25 20:09

urandom0


1 Answers

The link you provided indicates:

Deprecated since: 3.24

For overriding focus behavior, use the GtkWidgetClass::focus signal.

which, of course, is almost fully undocumented (sigh). I have checked the demos and saw nothing related to this, sadly.

From this migration from GTK3 to GTK4 guide:

In GTK 4, any widget can have children (and GtkContainer is gone). There is new API to navigate the widget tree, for use in widget implementations: gtk_widget_get_first_child(), gtk_widget_get_last_child(), gtk_widget_get_next_sibling(), gtk_widget_get_prev_sibling().

This could be a good place to start.

like image 98
BobMorane Avatar answered Sep 19 '25 15:09

BobMorane