diff --git a/snap/hooks/configure b/snap/hooks/configure new file mode 100644 index 0000000000..74f77985bb --- /dev/null +++ b/snap/hooks/configure @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +set -eu + +wayland_native="$(snapctl get wayland-native)" +if [[ -z "$wayland_native" ]]; then + snapctl set wayland-native=true +fi diff --git a/snap/launcher b/snap/launcher index f9337a2107..d3def4cebd 100644 --- a/snap/launcher +++ b/snap/launcher @@ -2,7 +2,8 @@ if [ -n "$WAYLAND_DISPLAY" ] && \ [ "${DISABLE_WAYLAND:-0}" = 0 ] && \ - [ "${GDK_BACKEND:-wayland}" = "wayland" ]; then + [ "${GDK_BACKEND:-wayland}" = "wayland" ] && \ + [ "$(snapctl get wayland-native)" != "false" ]; then args="--enable-features=WaylandWindowDecorations --ozone-platform=wayland --use-gl=desktop" fi