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
VS Code has Wayland logo on Overview instead of its own logo #129953
Comments
(Experimental duplicate detection) |
Related: electron/electron#29523 (comment) The fix for this might come from chromium#1138724 |
I can confirm that the fix which Google Chrome implemented in their 94 release works for the Google Chrome application. It is pretty much very possible that VS Code also sets wrong app id which causes the same issue. A fix is probably needed on the VS Code side. |
Thanks for linking the upstream bug, unlike chrome which used to case the WM_CLASS before https://chromium-review.googlesource.com/c/chromium/src/+/3071380 electron just used the result of the api app.setName from apps https://github.com/electron/electron/blob/6aece4a83d12b6ec610994895e43560ae1aa77dc/shell/browser/native_window_views.cc#L254 and when the api is not called by the apps it will use the value of Currently VSCode uses capitalised value for the field, I can fix this on our end but would rather implement the fix in electron so that each app need not cover this case for wayland. |
Could I work around this problem by manually copying the This is what my distro's
Based on the details I've read, I've experimented with changing the Any suggestions would be greatly appreciated! |
After copying the desktop file to Tried Examining it in
So it looks like gnome sees a blank wmclass field.
Not sure how this is supposed to work - for the heck of it I tried setting the |
Same issue here. It would be very nice to have this fixed, somehow. |
Is there any ETA on this? |
Same issue as you with latest 1.71 update. Icon now shows at least but not identified. |
WorkaroundIn 1.70.x, the Then based on @rstrube 's workaround, change the I'm not sure who should take care of the .desktop file, The vscode developer or the AUR package maintainer? |
It does seem like the only issue on Wayland now is that This isn't an AUR issue since file is rendered with the short name of "Code" in the gulpfile. https://github.com/microsoft/vscode/blob/main/resources/linux/code.desktop |
In my case, on KDE, setting This is my change to the AUR package. diff --git a/PKGBUILD b/PKGBUILD
index ce380d1..cedf479 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -27,7 +27,7 @@ source_armv7h=(code_armhf_${pkgver}.tar.gz::https://update.code.visualstudio.com
# i686 uses "latest" instead of a specific version as it's not always updated in a timely manner
source_i686=(code_ia32_${pkgver}.tar.gz::https://update.code.visualstudio.com/latest/linux-ia32/stable)
# This generates cleaner checksums
-sha256sums=('10a5ee77a89fc934bcbd3e2a41a2ec4bd51d3cd048702f6d739ecec9eb3a7c4b'
+sha256sums=('dd4a203b229225178d7f65a4274e009118a593adb42f82d76d21d644fdcb36ec'
'2264dd138b77358709aa49fb3a7fe7d1b05b7ab0715760d66958000107bdd3dc'
'24ba09a6398c9781ed7cb6f1a9f6f38ec204899ba1f33db92638bf6d3cb0aed6'
'8257a5ad82fa1f7dec11dfa064217b80df4cfec24f50cec7ca0ad62cf8295bfe')
@@ -59,7 +59,7 @@ package() {
install -m644 "${srcdir}/${_pkg}/resources/app/LICENSE.rtf" "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE.rtf"
install -m644 "${srcdir}/${_pkg}/resources/app/resources/linux/code.png" "${pkgdir}/usr/share/icons/${_pkgname}.png"
- install -m644 "${srcdir}/${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${_pkgname}.desktop"
+ install -m644 "${srcdir}/${_pkgname}.desktop" "${pkgdir}/usr/share/applications/code-url-handler.desktop"
install -m644 "${srcdir}/${_pkgname}-url-handler.desktop" "${pkgdir}/usr/share/applications/${_pkgname}-url-handler.desktop"
install -m644 "${srcdir}/${_pkgname}-workspace.xml" "${pkgdir}/usr/share/mime/packages/${pkgname}-workspace.xml"
install -Dm 644 "${srcdir}/${_pkg}/resources/completions/bash/code" "${pkgdir}/usr/share/bash-completion/completions/code"
diff --git a/visual-studio-code.desktop b/visual-studio-code.desktop
index e2f9bb2..fd17318 100644
--- a/visual-studio-code.desktop
+++ b/visual-studio-code.desktop
@@ -6,7 +6,7 @@ Exec=/usr/bin/code --unity-launch %F
Icon=visual-studio-code
Type=Application
StartupNotify=false
-StartupWMClass=Code
+StartupWMClass=code-url-handler
Categories=TextEditor;Development;IDE;
MimeType=text/plain;inode/directory;application/x-code-workspace;
Actions=new-empty-window; |
The problem can also be resolved by modifying the |
The solution by @kapvode (#129953 (comment)) was the only one working for me. Wouldn't it seem like this could be solved in the PKGBUILD after all? Have you considered integrating your patch into the AUR package build? Not sure if it has any negative side effects, but I'm happy that I finally have only one correct icon in my dock! |
I'm sorry about the late reply. I stopped having problems with the AUR package soon after I posted here. I assumed the maintainer of the package was aware of our discussion here and that the package was somehow fixed, although I never checked why I no longer had problems. I was simply happy that I didn't. For example, I was using version 1.75 for a long time without a problem. It's possible that was patched with my changes and I simply forgot, but I also installed version 1.80 now without any patches, and it is fine. I also don't really know what the proper fix is. I simply wanted to share my discoveries. From what I remember, I started by following the link to the Chromium bug posted here, and then to some Firefox bugs that I maybe found there, I'm not sure any more. In the case of Firefox, I still have one remaining problem. I'm using the beta version installed as a plain tar archive. The files are owned by the regular user and Firefox can update itself. First it downloads an update and then applies it the next time it starts. On that occasion, when it starts and applies an update, I get the generic Wayland icon. If I close it and start it again, it is fine. Depending on how one installs Visual Studio Code, they might also have that problem. I know VS Code is an Electron application and things are different, but maybe there is a similar problem. I don't know. |
Issue Type: Bug
Please see the bug description here: https://bugs.kde.org/show_bug.cgi?id=438951
VS Code version: Code 1.58.2 (c3f1263, 2021-07-14T22:30:16.440Z)
OS version: Linux x64 5.11.0-25-lowlatency
Restricted Mode: No
System Info
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Extensions (52)
A/B Experiments
The text was updated successfully, but these errors were encountered: