-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: add optional Wayland support #471
Comments
you can use |
I don't think there is any environmental variable to make chromium based stuff to use Wayland (unlike Firefox which has MOZ_ENABLE_WAYLAND=1). As far as I'm aware, the only options for Chromium are inside the program (menu isn't available in VSCode), through a config file (which VSCode doesn't read without a patch), or from the command line. |
This seems to fix the blurry fonts with Wayland instead of X: flatpak --socket=wayland run com.visualstudio.code --enable-features=UseOzonePlatform --ozone-platform=wayland
|
Here's my .desktop file, which supersedes the system com.visualstudio.code.desktop; note the
|
You can set the environmental variable |
thanks. this worked for me.
extra for kde: fix generic wayland icon in kde |
I stumbled over that issue and was digging a little bit... From what I understood so far as of now it should be possible to natively support Wayland without any user interaction with the following changes: Automatically set the platform hint on when launching from a Wayland session: # Proposed change to 'code.sh'
WL_DISPLAY="${WAYLAND_DISPLAY:-"wayland-0"}"
if [[ -e "${XDG_RUNTIME_DIR}/${WL_DISPLAY}" || -e "/${WL_DISPLAY}" ]]; then
echo "Debug: Enabling Wayland backend"
EXTRA_ARGS+=(
--ozone-platform-hint=auto
)
fi Change the yaml file according to the documention (search for # proposed change to 'com.visualstudio.code.yaml'
# replace line 14 ' - --socket=x11' with:
- --socket=fallback-x11
- --socket=wayland That said I'm not into building flatpak nor electron apps and I currently use the following changes to manually enforce that behavior for all apps... [Context]
sockets=wayland; Electron change: ELECTRON_OZONE_PLATFORM_HINT=auto This also allows to start the application the "Wayland way" if started from the console or the application menu. I hope this helps somehow. |
@chdalski This issue has been addressed for years, but the maintainers of this repo, don't want to merge them. You can see the PRs that improve the Wayland situation are just sitting there doing nothing. It bugs me everytime, I need to manually overrule things, which could work fine for both X11 & Wayland users. |
Currently, if I want to run VSCode in native Wayland mode, I need to either (1) launch from the terminal and pass ozone flags or (2) modify the desktop file and add those flags. Neither method is particularly good.
I propose that this this VSCode flatpak should follow in the steps of the Discord flatpak and add an optional native Wayland mode. With the Discord flatpak, it by default only comes with X11 access. But if you grant it Wayland access, it will automatically launch in native Wayland mode.
The text was updated successfully, but these errors were encountered: