forked from joejulian/gio
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:
@@ -422,12 +422,16 @@ func newX11Window(gioWin Callbacks, opts *Options) error {
|
||||
// make the window visible on the screen
|
||||
C.XMapWindow(dpy, win)
|
||||
|
||||
// Increment window counter.
|
||||
windowCounter <- +1
|
||||
go func() {
|
||||
defer func() {
|
||||
windowCounter <- -1
|
||||
}()
|
||||
w.w.SetDriver(w)
|
||||
w.setStage(system.StageRunning)
|
||||
w.loop()
|
||||
w.destroy()
|
||||
close(mainDone)
|
||||
}()
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user