I want to ask for hints on a problem I have converting the Liferea GTK3 code to GTK4. My problem is that dialogs when created are partially frozen. Callbacks from signals are triggered, but the UI does not change (entries not showing characters, button sensitivity does not change, hover effects do not show…).
This is a race condition because it does not always happen.
When creating the dialogs
UI is loaded from GtkBuilder resource
the code properly sets the transient window
and uses gtk_window_present() to show them
What I tried
I tried creating them with g_idle_add() → then it happens less often
I tried setting dialogs modal → doesn’t change behaviour
I’m guessing there is a problem with the main loop. Network access in Liferea is done using libsoup3 and should be asynchronous though.
Are they native dialogs, or derived from Gtk.Dialog?
Pure gtk4, or libadwaita?
One issue I faced when porting apps to gtk4 was the fact that native dialogs references are not hold by gtk internally, so I had to manually keep a ref until they were closed. I remember of weird bugs when no refs were kept.
Thanks for working on Liferea, it’s a great app, I’m using it since ages
I did try to extra-reference it, but this did not help.
What I found out by experimenting, that when I do not set the dialog transient to the main window then the issue is 100% gone. Of course this is not the way to do it…
I’m glad Liferea has been useful for you for a long time!