Closed Oberonc closed 1 year ago
Yeah, I think it's probably a GJS bug. It can be reproduced with the following script:
#!/usr/bin/gjs
imports.gi.versions.Gtk = '4.0'
const { Gtk } = imports.gi
const app = new Gtk.Application({ application_id: 'org.gtk.Example' })
app.connect('activate', () => {
const win = new Gtk.ApplicationWindow({ application: app })
win.present()
const dialog = new Gtk.FileChooserNative({ transient_for: win })
dialog.show()
})
app.run([])
It doesn't seem to happen with Gtk.FileDialog
, though. And since Gtk.FileChooserNative
is deprecated, anyway, it should probably just switch to Gtk.FileDialog
(which would require GTK 4.10).
I've cloned the GTK4 branch and tested it a bit. When I try to open a book by clicking the "Open.." in the menu to to open the "Open file" dialog, said dialog closes by itself after 10 seconds (doesn't matter if I interacted with it or not)