mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-08 02:45:38 +00:00
app{,/internal/window}: make app.Main blocking on desktop platforms
This CL implements the app.Main function as a blocking-forever function for JS, Wayland, Windows and X11. This works better for applications that can now programmatically close windows.
This commit is contained in:
committed by
Elias Naur
parent
facf5cbb9d
commit
6a9a870462
@@ -232,14 +232,8 @@ func newWLWindow(window Callbacks, opts *Options) error {
|
||||
d.destroy()
|
||||
return err
|
||||
}
|
||||
// Increment window counter.
|
||||
windowCounter <- +1
|
||||
w.w = window
|
||||
go func() {
|
||||
defer func() {
|
||||
// Decrement window counter.
|
||||
windowCounter <- -1
|
||||
}()
|
||||
defer d.destroy()
|
||||
defer w.destroy()
|
||||
w.w.SetDriver(w)
|
||||
|
||||
Reference in New Issue
Block a user