From b87bcaefe9fbcc4bbcd0c3ab06e50b331369afd1 Mon Sep 17 00:00:00 2001 From: V Date: Mon, 7 Aug 2023 00:39:29 +0200 Subject: [PATCH] Wayland: Skip our screenshare screen picker --- src/main/screenShare.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/screenShare.ts b/src/main/screenShare.ts index 37ce4cd..6cc3f6f 100644 --- a/src/main/screenShare.ts +++ b/src/main/screenShare.ts @@ -29,6 +29,16 @@ export function registerScreenShareHandler() { } }); + const isWayland = + process.platform === "linux" && + (process.env.XDG_SESSION_TYPE === "wayland" || !!process.env.WAYLAND_DISPLAY); + + if (isWayland) { + const video = sources[0]; + callback(video ? { video } : {}); + return; + } + const data = sources.map(({ id, name, thumbnail }) => ({ id, name,