From 781970c84cd2e18a6eddd6c86a8415cc3bf72bed Mon Sep 17 00:00:00 2001 From: Tobias Gesellchen Date: Thu, 7 Dec 2023 07:52:55 +0100 Subject: [PATCH] Adopt to api change of gioui.org@0.4.x See https://gioui.org/news/2023-11#api-change-window-event-iteration --- cmd/main.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmd/main.go b/cmd/main.go index b4d51ee..613b8fd 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -78,13 +78,14 @@ func main() { }() var ops op.Ops - for e := range w.Events() { - switch e := e.(type) { - + for { + switch e := w.NextEvent().(type) { case system.FrameEvent: gtx := layout.NewContext(&ops, e) splashWidget.Layout(gtx) e.Frame(gtx.Ops) + case system.DestroyEvent: + // Omitted } } }()