Starting with gioui.org v0.3.2-0.20231008234652-7550d8544732, under Wayland, the system.DestroyEvent is inoperable. (clickon on them only flashes and does not terminate the app. Also the other default window controls do not work.
Tested with Fedora 38, Gnome 44.5. The same code operates normally under X11 and Mac OS.
The issue may be reproduded with with giocanvas clients (https://github.com/ajstarks/giocanvas) and expgio clients (https://github.com/egonelbre/expgio), cloth, flowers, pie.
I don't have a Gnome setup, and I couldn't reproduce this issue with the kitchen example on Sway. Can you reproduce the issues with the kitchen example?
It looks like kitchen needs to be updated:
$ go get gioui.org@main go: upgraded gioui.org v0.3.1 => v0.3.2-0.20231008234652-7550d8544732 $ go run kitchen.go # command-line-arguments ./kitchen.go:133:17: checkbox.Changed undefined (type *widget.Bool has no field or method Changed) ./kitchen.go:295:11: not enough arguments in call to button.Clicked have () want (layout.Context) ./kitchen.go:371:49: too many arguments in call to material.Slider have (*material.Theme, *widget.Float, number, number) want (*material.Theme, *widget.Float)
Can you reproduce with the hello example? That one may not require any code changes to compile.
Yes, the hello example shows the bug. Here is a pointer to a demo of the bug: https://gophers.slack.com/archives/CM87SNCGM/p1697120564422829?thread_ts=1696868667.083419&cid=CM87SNCGM
I remembered trying to fix something related to custom decorations for Windows, but I didn't get it fixed, due to time constraints.
WIP https://git.sr.ht/~egonelbre/gio/commit/55782d765b39b12fe747ccf207290b4789f0c852
I think it was something that the widget/material/decorations.go caused buttons to be not correctly handled... unfortunately don't recall the details anymore. It could've been something with regards to click boundaries being wrong or something.
Also, I'm unsure whether this information is helpful :D...
It appears to still be broken with v0.3.3-0.20231116145621-35cdcbe4d4b6
go run gioui.org/example/hello@latest # works go run gioui.org/example/hello@main # breaks
Also shows with giocanvas clients built with v0.3.2-0.20231125175025-f39245df99bf
I'm on linux/amd64 with wayland and hitting this since v0.4.x:
- go run gioui.org/example/color-grid@v0.3.2 # works
- go run gioui.org/example/color-grid@v0.4.0 # breaks
- go run gioui.org/example/color-grid@main # breaks (main => v0.4.1-0.20231201133605-fe672bac9d97)
Chris Waldon referenced this ticket in commit ab021c4.