SpacingBat3 / WebCord

A Discord and SpaceBar :electron:-based client implemented without Discord API.
MIT License
1.88k stars 94 forks source link

Use electron's native wayland support #411

Closed saolof closed 1 year ago

saolof commented 1 year ago

Electron 12 added native Wayland support, which allows it to avoid many of the security issues of XWayland such as being vulnerable to keyloggers, and also enables better touch screen support.

VSCode added support for it as part of this issue. It would be neat if WebCord could add support for it and enable it by default in the Flatpak distribution.

In particular, this leads to the flatpak build being labeled as insecure by gnome software. I believe that can be fixed by adding --socket=wayland and eventually replacing --socket=x11 with a --socket=fallback-x11 in the flatpak manifest to first grant access to wayland, and then to signal to flatpak that it is acceptable to block access to the X server when wayland is available.

As long as the wayland socket is enabled, afaik it is possible to test this today by setting flatpak overrides following the instructions in this stack overflow answer: https://stackoverflow.com/questions/63187542/how-to-run-electron-apps-for-wayland

SpacingBat3 commented 1 year ago

I do not maintain flatpaks and neither plan to mess with setting Wayland by default if it isn't for pretty much any browser. Sure, Wayland may work better for your case, but for others it might lead to crashes, bugs, limitations and bunch of stuff not being a case on XWayland.

I close this issue as it is more a request to Flatpak maintainers, not me.