diff --git a/pkg/mod/github.com/wailsapp/wails/v2@v2.0.0-beta.37/internal/frontend/desktop/linux/frontend.go b/pkg/mod/github.com/wailsapp/wails/v2@v2.0.0-beta.37/internal/frontend/desktop/linux/frontend.go index 4d045c0..3dccecb 100644 --- a/pkg/mod/github.com/wailsapp/wails/v2@v2.0.0-beta.37/internal/frontend/desktop/linux/frontend.go +++ b/pkg/mod/github.com/wailsapp/wails/v2@v2.0.0-beta.37/internal/frontend/desktop/linux/frontend.go @@ -58,8 +58,10 @@ func init() { func NewFrontend(ctx context.Context, appoptions *options.App, myLogger *logger.Logger, appBindings *binding.Bindings, dispatcher frontend.Dispatcher) *Frontend { - // Set GDK_BACKEND=x11 to prevent warnings - _ = os.Setenv("GDK_BACKEND", "x11") + // Set GDK_BACKEND=x11 if currently unset and XDG_SESSION_TYPE is unset, unspecified or x11 to prevent warnings + 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") + } result := &Frontend{ frontendOptions: appoptions, diff --git a/riftshare-0.1.9/main.go b/riftshare-0.1.9/main.go index 47f72b7..83ade8c 100644 --- a/riftshare-0.1.9/main.go +++ b/riftshare-0.1.9/main.go @@ -28,7 +28,7 @@ var icon []byte func main() { if runtime.GOOS == "linux" { - _ = os.Setenv("GDK_BACKEND", "wayland,x11") + // _ = os.Setenv("GDK_BACKEND", "wayland,x11") // _ = os.Setenv("GTK_USE_PORTAL", "1") }