Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
gesellix committed Jul 19, 2024
1 parent a239443 commit 4bb6314
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,18 @@ func main() {
os.Exit(0)
}()

// TODO work around https://todo.sr.ht/~eliasnaur/gio/602
// this should only be required shortly after creating the window w.
performCenter := sync.OnceFunc(func() {
w.Perform(system.ActionCenter)
})
var ops op.Ops
for {
switch e := w.Event().(type) {
case app.FrameEvent:
// TODO remove after update to gioui.org > v0.6.0
// to use the proper fix from https://todo.sr.ht/~eliasnaur/gio/575
sync.OnceFunc(func() {
w.Option(options...)
})()
// TODO work around https://todo.sr.ht/~eliasnaur/gio/602
// this should only be required shortly after creating the window w.
performCenter()
gtx := app.NewContext(&ops, e)
splashWidget.Layout(gtx)
e.Frame(gtx.Ops)
Expand Down

0 comments on commit 4bb6314

Please sign in to comment.