Skip to content

Commit

Permalink
#1 - fix crash when running under wayland
Browse files Browse the repository at this point in the history
  • Loading branch information
parvit committed Sep 3, 2024
1 parent 1bd1c3b commit 9a5008c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dlgs_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,15 @@ package dialog
import "C"
import "unsafe"

import (
"os"
)

var initSuccess bool

func init() {
os.Setenv("GDK_BACKEND", "x11") // fix crash on wayland

C.XInitThreads()
initSuccess = (C.gtk_init_check(nil, nil) == C.TRUE)
}
Expand Down

0 comments on commit 9a5008c

Please sign in to comment.