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 enable the native wayland client by using
  snap set mailspring wayland-native=true

By default mailspring will use xwayland, but the support can be toggled
by users with the said command.
  • Loading branch information
3v1n0 committed Jan 12, 2024
1 parent 08782c7 commit 7bb2912
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
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=false
fi
6 changes: 3 additions & 3 deletions snap/launcher
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/sh

if [ -n "$WAYLAND_DISPLAY" ] && \
[ "${DISABLE_WAYLAND:-0}" = 0 ] && \
[ "${GDK_BACKEND:-wayland}" = "wayland" ]; then
if [ "${DISABLE_WAYLAND:-0}" = 0 ] && \
[ "${GDK_BACKEND:-wayland}" = "wayland" ] && \
[ "$(snapctl get wayland-native)" = "true" ]; then
args="--enable-features=WaylandWindowDecorations --ozone-platform=wayland --use-gl=desktop"
fi

Expand Down

0 comments on commit 7bb2912

Please sign in to comment.