-
Notifications
You must be signed in to change notification settings - Fork 191
Open
Description
As in title.
On my Linux/Wayland machine (NixOS + Apple Silicon), pressing the fn key triggers a panic (scancode 464).
It does not happen on X11.
I hit this first in Supersonic, and found #386, but that's on MacOS.
This is reproducible on current master (da16c12 at time of writing), using glfw 3.3.10.
Reproducer:
package main
import (
"fmt"
"runtime"
"github.com/go-gl/glfw/v3.3/glfw"
)
func init() {
runtime.LockOSThread()
}
func main() {
err := glfw.Init()
if err != nil {
panic(err)
}
defer glfw.Terminate()
fmt.Printf("GLFW Version: %s\n", glfw.GetVersionString())
name := glfw.GetKeyName(glfw.KeyUnknown, 464)
fmt.Println(name)
}Output:
$ go run -tags wayland ./main.go
# github.com/go-gl/glfw/v3.3/glfw
In file included from vendor/github.com/go-gl/glfw/v3.3/glfw/c_glfw_lin.go:9:
vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/wl_window.c:29:9: warning: ‘_GNU_SOURCE’ redefined
29 | #define _GNU_SOURCE
| ^~~~~~~~~~~
<command-line>: note: this is the location of the previous definition
GLFW Version: 3.3.10 Wayland EGL OSMesa clock_gettime evdev
panic: InvalidValue: Wayland: Invalid scancode 464
goroutine 1 [running, locked to thread]:
github.com/go-gl/glfw/v3.3/glfw.acceptError({0x0, 0x0, 0x40000c01a0?})
/home/zane/Documents/Coding/glfwcrashtest/vendor/github.com/go-gl/glfw/v3.3/glfw/error.go:177 +0x158
github.com/go-gl/glfw/v3.3/glfw.panicError(...)
/home/zane/Documents/Coding/glfwcrashtest/vendor/github.com/go-gl/glfw/v3.3/glfw/error.go:188
github.com/go-gl/glfw/v3.3/glfw.GetKeyName(0x5097d8?, 0x400007e020?)
/home/zane/Documents/Coding/glfwcrashtest/vendor/github.com/go-gl/glfw/v3.3/glfw/input.go:445 +0x3c
main.main()
/home/zane/Documents/Coding/glfwcrashtest/main.go:23 +0x8c
exit status 2
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels