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

[GNOME Linux] No window decoration (shadow) if a window title bar style is custom #225073

Open
proninyaroslav opened this issue Aug 7, 2024 · 8 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug electron Issues and items related to Electron titlebar VS Code main title bar issues upstream Issue identified as 'upstream' component related (exists outside of VS Code) wayland Issue related to wayland display server

Comments

@proninyaroslav
Copy link

proninyaroslav commented Aug 7, 2024

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.92.0
  • OS Version: Fedora 40 (GNOME 46)

Steps to Reproduce:

  1. Set window.titleBarStyle options to custom in the settings
  2. Run VSCode in the Wayland mode, for example, type it in the terminal:
$ ELECTRON_OZONE_PLATFORM_HINT=auto code

Expected behaviour

There should be a window decoration (shadow) as it is in XWayland compatibility mode:
image

Actual behaviour

There is no window decoration/shadow:
image

But If I set window.titleBarStyle to native, the window decoration/shadow appears:
image

@proninyaroslav proninyaroslav changed the title [Fedora Linux] No window decoration (shadow) window.titleBarStyle is custom [Fedora Linux] No window decoration (shadow) if window.titleBarStyle is custom Aug 7, 2024
@proninyaroslav proninyaroslav changed the title [Fedora Linux] No window decoration (shadow) if window.titleBarStyle is custom [GNOME Linux] No window decoration (shadow) if window.titleBarStyle is custom Aug 7, 2024
@proninyaroslav proninyaroslav changed the title [GNOME Linux] No window decoration (shadow) if window.titleBarStyle is custom [GNOME Linux] No window decoration (shadow) if a window title bar style is custom Aug 7, 2024
@proninyaroslav
Copy link
Author

Tested on 1.92.1, still has problem.

@proninyaroslav
Copy link
Author

proninyaroslav commented Aug 9, 2024

I noticed another fact: in Wayland mode, a new window opens as Visual Studio Code - URL Handler, and not as it should be (Visual Studio Code). Maybe this is the reason.

image

@deepak1556 deepak1556 added bug Issue identified by VS Code Team member as probable bug upstream Issue identified as 'upstream' component related (exists outside of VS Code) electron Issues and items related to Electron titlebar VS Code main title bar issues wayland Issue related to wayland display server labels Aug 23, 2024
@sbatten sbatten assigned benibenj and unassigned sbatten Sep 11, 2024
@cbrnr
Copy link

cbrnr commented Sep 23, 2024

I can confirm the missing window decorations (i.e. shadows) when running on GNOME/Wayland when using the custom title bar style (the default). It would be really nice if this worked, because

  1. the native title bar is not an option for me (the layout shortcut buttons are missing and it takes up more space), and
  2. running via XWayland is also not an option, because I use fractional scaling (150%), which is very blurry in XWayland (but super crisp on Wayland).

Regarding the comment on "Visual Studio Code - URL Handler", I still haven't figured out why there are two desktop files, but you can at least fix the issue with two task bar entries (and/or missing icons) by setting StartupWMClass=code-url-handler in ~/.local/share/applications/code.desktop (create a copy of /usr/share/applications/code.desktop in that location and edit the copy in your home folder), see #129953 (comment) and #129953 (comment).

@proninyaroslav
Copy link
Author

@cbrnr
Yes, I was a little confused about URL Handler. I eventually found that even with the system window frame, VSCode still launched as URL Handler.

@jhasse
Copy link
Contributor

jhasse commented Sep 26, 2024

I think it's one of these upstream bugs and nothing VSCode could (or should) do itself about it:

@proninyaroslav
Copy link
Author

@jhasse
Well, as a workaround, we can add a border to at least somehow distinguish the window frame from the rest.

@cbrnr
Copy link

cbrnr commented Sep 26, 2024

However, Google Chrome does have borders and a shadow even though it is the basis of Electron (and it also has a custom title bar). So it might be worth looking into how they achieve this.

@proninyaroslav
Copy link
Author

@cbrnr
I confirm, I'm using a custom frame in Chrome and it has a shadow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug electron Issues and items related to Electron titlebar VS Code main title bar issues upstream Issue identified as 'upstream' component related (exists outside of VS Code) wayland Issue related to wayland display server
Projects
None yet
Development

No branches or pull requests

6 participants