From b1c3bf96f67ea49d4fe720d763cda3a5f30fe1d5 Mon Sep 17 00:00:00 2001 From: Patrizio Bruno Date: Tue, 17 Jan 2023 15:08:40 +0000 Subject: [PATCH 1/2] enable wayland support if run in a wayland session --- code.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code.sh b/code.sh index de8d0ec..2173486 100755 --- a/code.sh +++ b/code.sh @@ -4,6 +4,7 @@ set -e shopt -s nullglob FIRST_RUN="${XDG_CONFIG_HOME}/flatpak-vscode-first-run" +WAYLAND_OPTS="" function msg() { echo "flatpak-vscode: $*" >&2 @@ -14,6 +15,10 @@ if [ ! -f ${FIRST_RUN} ]; then touch ${FIRST_RUN} fi +if [ "$XDG_SESSION_TYPE" = "wayland" ]; then + WAYLAND_OPTS="--ozone-platform-hint=auto" +fi + PYTHON_SITEDIR=$(python3 < Date: Tue, 17 Jan 2023 15:52:32 +0000 Subject: [PATCH 2/2] enable wayland socket --- com.visualstudio.code.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/com.visualstudio.code.yaml b/com.visualstudio.code.yaml index ab76c3f..90acce8 100644 --- a/com.visualstudio.code.yaml +++ b/com.visualstudio.code.yaml @@ -12,6 +12,7 @@ finish-args: - --require-version=0.10.3 - --share=ipc - --socket=x11 + - --socket=wayland - --socket=pulseaudio - --socket=ssh-auth - --share=network