zlacker

[parent] [thread] 0 comments
1. bravet+(OP)[view] [source] 2022-09-25 00:12:51
If it's using a recent build of Electron you can in fact use proper Wayland. Electron supports it, if something doesn't; they're on an old version.

Even sharing with the help of various 'portals', e.g. xdg-desktop-portal-gnome or xdg-desktop-portal-wlr

It 'simply' takes some arguments at runtime. Below are what I use -- taken from my Sway 'start on login' script [some is superfluous]:

    ElectronThingHere --silent --enable-gpu --use-gl=egl --enable-features='VaapiVideoDecoder,VaapiVideoEncoder,WebRTCPipeWireCapturer,UseOzonePlatform' --ozone-platform=wayland
You'll find they're basically identical to what you'd use to enable/force Wayland on Chrome. Also VAAPI {en,de}coding and pipewire based sharing

You can also replace --ozone-platform=wayland with --ozone-platform-hint=auto for less strong-handed encouragement

I use quite a few different Electron-driven things on Wayland. Discord is the only one seemingly refusing to update their Electron base... and getting free Wayland support

If not for them I'd remove XWayland support entirely from my Sway configuration

[go to top]