Closed amricko0b closed 3 years ago
Definitely a bug, the dialog package doesn't even offer an API to provide a parent for windows it spawns. This must have been an oversight in the gtk2 -> gtk3 upgrade (#4, #21) which I haven't tested personally because gotk3 wasn't building under WSL at the time. @meskio @anarcat do either of you have a better perspective here?
I don't know much about gtk, and I have to admit I didn't test the file chooser. Sorry.
I don't have any better ideas than the proposed invisible window. @amricko0b do you feel like giving it a try to do a pull req?
@amricko0b If you could provide the stack trace for the panic it would be helpful to know where it crashes exactly.
I have the same bug in Ubuntu 18.04.
I've submitted a PR to gotk3 here: https://github.com/gotk3/gotk3/issues/490
@celer Thank you for looking into this! It has been on my list for way too long.
Seems this has been addressed upstream, but maybe also related to #51. Should probably update go.mod with a known working version before closing this.
Ultimately solved by removing gotk3 from the equation and using the gtk3 headers directly via cgo.
Greetings!
gotk3 does not allow you to pass nill parent for file choosers. So, when I create a file dialog, my app crashes with NPE.
Am I do something wrong? If it's a bug, maybe it would be useful to populate FileBuilder with invisible window object that will be used as parent for file dialogs.