diff --git a/icon.png b/icon.png index 92bd11d..975e6a6 100644 Binary files a/icon.png and b/icon.png differ diff --git a/ui/gui.go b/ui/gui.go index 76a9113..262f782 100644 --- a/ui/gui.go +++ b/ui/gui.go @@ -93,15 +93,14 @@ func (g *GUI) run(w *app.Window) error { case e := <-w.Events(): switch e := e.(type) { case system.DestroyEvent: + logrus.Info("Closing") + g.cancel() + g.router.Wg.Wait() return e.Err case system.FrameEvent: gtx := layout.NewContext(&ops, e) g.router.Layout(gtx, g.router.Theme) e.Frame(gtx.Ops) - case *system.DestroyEvent: - g.cancel() - g.router.Wg.Wait() - return nil } case <-g.router.Ctx.Done(): logrus.Info("Closing")