mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 18:35:34 +00:00
app/internal/window: block Main until all windows are closed
With this change, the Wayland backend now supports multiple windows. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -179,13 +179,18 @@ 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
|
||||
}()
|
||||
w.w.SetDriver(w)
|
||||
w.loop()
|
||||
w.destroy()
|
||||
d.destroy()
|
||||
close(mainDone)
|
||||
}()
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user