Skip to content

Commit

Permalink
snap: Make native wayland client support configurable
Browse files Browse the repository at this point in the history
Make possible for users to toggle the native wayland client by using
  snap set mailspring wayland-native=false
  • Loading branch information
3v1n0 committed Jan 10, 2024
1 parent 08782c7 commit 8e71cb6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions snap/hooks/configure
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion snap/launcher
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 8e71cb6

Please sign in to comment.