GTK4: gtk_widget_grab_focus on GtkEntry

Hello,

I am porting a GTK3 application into GTK4. This application has a complex input window with number of various widgets. The widget which receives focus by default depends on application logic and is set by gtk_widget_grab_focus() called on that widget. In most cases this widget is of GtkEntry.

However, the focus actually goes to the next widget on the window. But if I execute this application under gdb with a breakpoint set on gtk_widget_grab_focus() function and continue through all breaks, the focus is set correctly.

What I should look at to fix this issue?

Tx

1 Like

You can attach a minimal sample GTK4 program with the issue here.

Thanks!

The fix for the issue is proposed: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/3413

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.