Skip to content

Commit

Permalink
fix: enable to run natively in wayland
Browse files Browse the repository at this point in the history
Incorporated from this v2 change:
wailsapp#1811
  • Loading branch information
stendler authored and github-actions[bot] committed Jul 22, 2024
1 parent 49fdf10 commit 82eb0eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion v3/pkg/application/application_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ import (
func init() {
// FIXME: This should be handled appropriately in the individual files most likely.
// Set GDK_BACKEND=x11 if currently unset and XDG_SESSION_TYPE is unset, unspecified or x11 to prevent warnings
_ = os.Setenv("GDK_BACKEND", "x11")
if os.Getenv("GDK_BACKEND") == "" && (os.Getenv("XDG_SESSION_TYPE") == "" || os.Getenv("XDG_SESSION_TYPE") == "unspecified" || os.Getenv("XDG_SESSION_TYPE") == "x11") {
_ = os.Setenv("GDK_BACKEND", "x11")
}
}

type linuxApp struct {
Expand Down

0 comments on commit 82eb0eb

Please sign in to comment.