mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 01:15:35 +00:00
apps: remove use of app.Window.IsAlive
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -185,7 +185,7 @@ func (a *App) run() error {
|
||||
a.w.Profiling = *stats
|
||||
ops := new(ui.Ops)
|
||||
var lastMallocs uint64
|
||||
for a.w.IsAlive() {
|
||||
for {
|
||||
select {
|
||||
case users := <-a.updateUsers:
|
||||
a.users = users
|
||||
@@ -219,6 +219,9 @@ func (a *App) run() error {
|
||||
a.ctxCancel = nil
|
||||
}
|
||||
}
|
||||
if e.Stage == app.StageDead {
|
||||
return a.w.Err()
|
||||
}
|
||||
case *app.CommandEvent:
|
||||
switch e.Type {
|
||||
case app.CommandBack:
|
||||
@@ -253,7 +256,6 @@ func (a *App) run() error {
|
||||
}
|
||||
}
|
||||
}
|
||||
return a.w.Err()
|
||||
}
|
||||
|
||||
func newApp(w *app.Window) *App {
|
||||
|
||||
Reference in New Issue
Block a user