Skip to content
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

enable wayland support if run in a wayland session, closes #281 #373

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

patriziobruno
Copy link
Contributor

@patriziobruno patriziobruno commented Jan 17, 2023

fix for #281

@flathubbot
Copy link
Contributor

Started test build 17817

@patriziobruno patriziobruno changed the title enable wayland support if run in a wayland session, closes #77 enable wayland support if run in a wayland session, closes #281 Jan 17, 2023
@flathubbot
Copy link
Contributor

Build 17817 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/446/com.visualstudio.code.flatpakref

@flathubbot
Copy link
Contributor

Started test build 17839

@flathubbot
Copy link
Contributor

Build 17839 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/468/com.visualstudio.code.flatpakref

@storopoli
Copy link

Do we merge this? I am also having the same issue as #281.

@qnixsynapse
Copy link

This should be definitely merged imo.
Also "--ozone-platform-hint=auto" isn't a just a wayland specific flag. It just auto sets the desired ozone platform. Just passing this flag is enough. There is no need to check if the app is running in a wayland session or not.

@francoism90
Copy link

Can this please be merged? :)

@@ -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
Copy link

@owtaylor owtaylor Jul 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The outer check isn't necessary -- --ozone-platform-hint=auto means "Check if XDG_SESSION_TYPE=wayland, if so, use wayland, otherwise use x11". (Meaning WAYLAND_OPTS isn't necessary and the argument could be passed unconditionally.)

@owtaylor
Copy link

What are the blockers for merging this? If there's a desire to have --ozone-platform-hint=auto" upstream in vscode, is there an upstream bug report tracking that?

The problem that I see offhand is that with the preference "Title Bar Style" "native" - which I think is the default, the window appears without decorations under GNOME. "Title Bar Style: custom" works well.

@owtaylor
Copy link

The problem that I see offhand is that with the preference "Title Bar Style" "native" - which I think is the default, the window appears without decorations under GNOME. "Title Bar Style: custom" works well.

microsoft/vscode#124202 was closed because this supposedly was fixed upstream in electron (though without native GNOME-style decorations, it seems better to use the vscode custom style than a fallback). But it didn't work for me in testing - not sure why.

@qnixsynapse
Copy link

I do not understand, why isn't this getting merged?

At-least make the app pick up chromium flags in ~/.var/app/com.visualstudio.code/config/code-flags.conf

Not everyone prefers running Xorg session. And chromium xorg is horrible on Wayland.

Also this(sync fails):
image

@@ -12,6 +12,7 @@ finish-args:
- --require-version=0.10.3
- --share=ipc
- --socket=x11
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also should be fallback-x11

@bilelmoussaoui
Copy link
Member

I do not understand, why isn't this getting merged?

At-least make the app pick up chromium flags in ~/.var/app/com.visualstudio.code/config/code-flags.conf

Not everyone prefers running Xorg session. And chromium xorg is horrible on Wayland.

Also this(sync fails): image

Because there are comments that were not addressed yet.

@jrelvas-ipc
Copy link

jrelvas-ipc commented Sep 6, 2023

Sure, it might not be fully working yet, but for some (including myself), it's already in a "good enough" state. Is it possible to add an option of some kind which enables Wayland, or is this technically infeasible? I'd rather have a bad window decoration over needing to use XWayland.

At-least make the app pick up chromium flags in ~/.var/app/com.visualstudio.code/config/code-flags.conf

Definitely, otherwise, it's a nightmare to enable Wayland with this flatpak, and by extension, immutable distros.

@yodatak
Copy link

yodatak commented Sep 25, 2023

Could we rewrite this pr to make wayland default , the blurry windows of x11 on wayland make fedora look like a verry old computer ?

@yodatak
Copy link

yodatak commented Sep 25, 2023

for me i have to edit sudo vi /var/lib/flatpak/exports/share/applications/com.visualstudio.code.desktop
and make this type of change
and add the wayland socket in flatseal but i got this issue who is not resolved i think
electron/electron#19810
( and on fedora 39 beta on intel i got some crash that make my shell soft crash when runing vscode sometime not sure its linked )

add this after com.visualstudio.code --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants