~eliasnaur/gio#542: 
Window controls inoperable with Wayland

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.

Status
RESOLVED FIXED
Submitter
~ajstarks
Assigned to
No-one
Submitted
1 year, 1 month ago
Updated
10 months ago
Labels
No labels applied.

~eliasnaur 1 year, 1 month ago

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?

~ajstarks 1 year, 1 month ago

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)

~whereswaldon 1 year, 1 month ago

Can you reproduce with the hello example? That one may not require any code changes to compile.

~ajstarks 1 year, 1 month ago*

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

~egonelbre 1 year, 1 month ago

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...

~ajstarks 1 year, 5 days ago*

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

~arl 10 months ago

I'm on linux/amd64 with wayland and hitting this since v0.4.x:

~whereswaldon REPORTED FIXED 10 months ago

Chris Waldon referenced this ticket in commit ab021c4.

Register here or Log in to comment, or comment via email.