Skip to content

Commit

Permalink
Adopt workaround to changed behaviour of Gioui 0.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gesellix committed Jan 16, 2025
1 parent b6022bb commit 2ad4c8f
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"fmt"
"image/color"
"os"
"sync"
"time"

"gioui.org/app"
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 2ad4c8f

Please sign in to comment.