zed icon indicating copy to clipboard operation
zed copied to clipboard

No shadow behind maximized windows makes transparent themes look inconsistent

Open jansol opened this issue 1 year ago • 2 comments

Check for existing issues

  • [X] Completed

Describe the bug / provide steps to reproduce it

Tested on Plasma and GNOME in Wayland sessions. When using a transparent theme, the background is noticeably brighter when the window is maximized. This is easy to verify:

  1. set a bright wallpaper
  2. set a theme with semi-transparent background
  3. manually resize the window to cover most of the screen
  4. then toggle the maximize button on and off repeatedly

Maximizing the window also gets rid of the rounded corners, so I'm guessing that Zed skips drawing the shadow behind the window if the window is maximized. This makes sense since there is no space around the window where the shadow would normally be visible.

However with transparent themes this makes the look of the theme inconsistent can be an unpleasant surprise reduction in terms of readability.

I'm not sure if this affects X11? MacOS is unaffected for now since shadows are disabled for transparent windows due to compositor-side performance issues, and maximizing a window on modern macOS puts it in full screen on a temporary virtual desktop with a black background so (the lack of) a shadow would not be visible there either way.

I see two solutions: a. always draw the window shadow (simply clip it to the window region when maximized) b. never draw a CSD shadow behind the window contents, only outside the decoration boundary

Environment

Zed: v0.164.0 (Zed Dev 386031e6dd7f5edc9166b67c18559437b2636958) OS: Linux Wayland ubuntu 24.04 Memory: 31.3 GiB Architecture: x86_64 GPU: Radeon Vega Frontier Edition (RADV VEGA10) || radv || Mesa 24.0.9-0ubuntu0.2

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

No response

jansol avatar Nov 29 '24 16:11 jansol

Looks like Alacritty does not draw any shadow behind the window - if you set the window opacity to 0.0 you can see the shadow getting cut off at the edge of the window.

jansol avatar Dec 05 '24 15:12 jansol

still relevant

jansol avatar Apr 09 '25 12:04 jansol

As per this comment, macOS does NOT draw shadows behind transparent windows, only around them (regardless of background blur). For consistency in themes, the Wayland CSD should mirror this behaviour.

jansol avatar Jun 28 '25 00:06 jansol

Hi there! 👋 We're working to clean up our issue tracker by closing older bugs that might not be relevant anymore. If you are able to reproduce this issue in the latest version of Zed, please let us know by commenting on this issue, and it will be kept open. If you can't reproduce it, feel free to close the issue yourself. Otherwise, it will close automatically in 14 days. Thanks for your help!

github-actions[bot] avatar Nov 19 '25 09:11 github-actions[bot]

https://github.com/zed-industries/zed/discussions/43047

I have opened a discussion to add an option for disabling window decorations completely what would solve this issue for me.

kerzeld avatar Nov 19 '25 09:11 kerzeld