From 2ad4c8f1756f27669c09b4c8c730ee3e3f9be954 Mon Sep 17 00:00:00 2001 From: Tobias Gesellchen Date: Thu, 16 Jan 2025 07:49:17 +0100 Subject: [PATCH] Adopt workaround to changed behaviour of Gioui 0.8.0 --- cmd/main.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/cmd/main.go b/cmd/main.go index 519f553..b7f850c 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -4,7 +4,6 @@ import ( "fmt" "image/color" "os" - "sync" "time" "gioui.org/app" @@ -81,13 +80,22 @@ func main() { // TODO work around https://todo.sr.ht/~eliasnaur/gio/602 // this should only be required shortly after creating the window w. - applyOptions := sync.OnceFunc(func() { + applyOptions := func() { w.Option(app.Decorated(false)) w.Perform(system.ActionCenter) - }) + } + //applyOptions := sync.OnceFunc(func() { + // w.Option(app.Decorated(false)) + // w.Perform(system.ActionCenter) + //}) var ops op.Ops for { switch e := w.Event().(type) { + //case app.ConfigEvent: + // TODO work around https://todo.sr.ht/~eliasnaur/gio/602 + // this should only be required shortly after creating the window w. + //go applyOptions() + case app.FrameEvent: // TODO work around https://todo.sr.ht/~eliasnaur/gio/602 // this should only be required shortly after creating the window w.