Open bdovaz opened 5 years ago
Hello @bdovaz.
I think the behavior your experiencing (which also happens to me) is a "bug" on the GNOME side, where to avoid losing focus of the main window, GNOME places the dialog behind.
alt + tab
is a quick "fix".
The parent window is not the issue here. I think we need to call focus, maybe this is the answer: https://stackoverflow.com/questions/52411284/is-there-a-way-to-switch-focus-between-windows-in-a-single-gtk-application
But I'll have to test it out.
I am similar to you, but I will not respond when I open it for the first time, and the log will not provide any information, have you encountered this situation
@RicardoEPRodrigues
I'm only trying the project on this repo on Ubuntu 18.04 (on a VM).
I open the "BasicSampleScene" and I click on the "Open file" button.
I see that in "gtk_file_chooser_dialog_new" method there is a parameter to set the parent window and I think that this should fix it but I don't know how to get the active Window. I saw this:
https://developer.gnome.org/gtk3/stable/GtkApplication.html#gtk-application-get-active-window
But we also need a reference to the GtkApplication...
Is there any workaround? Thanks.