You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Application window does not have border shadow on KDE Plasma desktop environment (or not using mutter) #36768
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
I think it is not rocket science to find out who should fix the problem. If application uses own theme/decoration, then logically drawing all window decorations (including shadows) must be handled by application and not by DE. Otherwise developer of custom application might blame DE that it screw up design of application or whatever. Thing that shadows were working on Mutter (not anymore), doesn't means that problem is on KDE. They might made some workaround.
I understand that KDE is not implementing any workaround fix. Stick to native theme which we provide or manage all decorations by youself.
Noting that as I understand it Mattermost desktop suffers from this (no shadow or border) on Plasma. It used to be possible to add a window rule to force adding native titlebar and borders which then allow the shadow to be drawn but now that doesn't even work. This is definitely an electron issue which seems to be affected by defaults use in apps like Mattermost. I suspect "better behaved" apps do some extra work and so things appear ok, but for some, like Mattermost - it is just broken. No shadows, no workaround (KDE Plasma 6.5.4, mattermost-desktop 6.0.2)
Noting that as I understand it Mattermost desktop suffers from this (no shadow or border) on Plasma. It used to be possible to add a window rule to force adding native titlebar and borders which then allow the shadow to be drawn but now that doesn't even work. This is definitely an electron issue which seems to be affected by defaults use in apps like Mattermost. I suspect "better behaved" apps do some extra work and so things appear ok, but for some, like Mattermost - it is just broken. No shadows, no workaround (KDE Plasma 6.5.4, mattermost-desktop 6.0.2)
You may still provide platform info to DOM root element and draw on body 1px border line. Some apps do that (including mine), it improvs readability a lot, but no shadows...
Okay, to give some technical details. There is a Wayland protocol called xdg-decoration-unstable-v1. It controls whether an application window should draw the title bar and shadows itself or not. There is also older KDE-specific protocol called kde-server-decoration.
Okay, to give some technical details. There is a Wayland protocol called xdg-decoration-unstable-v1. It controls whether an application window should draw the title bar and shadows itself or not. There is also older KDE-specific protocol called kde-server-decoration.
This means that the application requests client-side decorations.
Same with Obsidian. However, it provides a setting to request SSD. In this case, KDE draws the decorations.
So, the application requests CSD, KDE provides CSD. The behavior probably changed between Electron 29 and Electron 31 (or between MM 5.8 and 5.9).
P.S. This change probably comes from Chrome, not Electron itself.
That's literally just "can I has native titlebars?" the pseudo-standard basically, and has no part in this bug report as SSD-using Electron obviously is out of this issue's scope.
What needs to be done to fix this issue is to, like Chromium itself, simply render a shadow around the window then use set_window_geometry(?) to make the shadows out-of-bounds regarding actual window geometry. You'd also need to detect snapping and disable the shadow and change the window geometry, but that's part in parcel... that, or somehow just render the window the way Chromium renders PWA windows (which is what Electron seems to be trending towards anyways due to the Chromium titlebuttons usage).
It’s not obviously out of scope, that’s basically the reason why it worked before and does not work now. Where to go from here is obviously debatable.
Having server-side decorations (xdg-decorations protocol) means the compositor handles both the titlebar, and in the process the shadows, instead of the application, which is indeed out of scope for this bug as it is only about applications that don't opt into native titlebars but rather:
Have Chromium titlebar buttons embedded into the window body (CSD with Chromium titlebuttons, e.g.: Visual Studio Code when titlebar is disabled)
Use entirely custom titlebars (fullly custom CSD, e.g.: Cursor, iirc)
In both those CSD cases, not cases where a native titlebar is used instead when xdg-decorations is available, it is the application's job to render shadows around itself, thus what this bug is about (the lack of those very shadows it should be rendering).
I'd personally report a bug to the documentation regarding that information being outdated.
This all being said, getting the client-side decoration Electron to render shadows and have appropriate 'window geometry' is the most likely missing thing here that is causing this issue in Wayland, I'd assume (the non-standard frame-extents that GNOME created in X11's case).
Ah… I see what you mean. Yeah, kinda hijacked I guess, but given that Electron switched from SSD to CSD by default, this bug probably will become the catch-all for all “where is my usual KDE titlebar” due to it’s name.
Alt + f3 » More Actions » Configure Special Application Settings » Add Property » No titlebar and frame: Foce = No
Before closing the popup copy the Window class (application) string
Then on System Settings » Window Decorations » Edit icon on selected decoration » Add Window specific overwrite » Matching window property: Window Class Name » Paste Window class into "Regular expression to match" (you can also use the button Detect Window Properties) » Hide window title bar: Always
Reacted by Dmitriy Zharov, George Stevenson and Philip Chan
Activity
easyteacher commentedon Jan 2, 2023
I was told to report the bug here because window manager is not responsible for CSD shadow.
wen-zheng commentedon Jan 14, 2023
encountered the same issue
github-actions commentedon Jun 27, 2023
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
wen-zheng commentedon Jun 27, 2023
this issue still exists
electron-issue-triage commentedon Sep 27, 2023
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
detiam commentedon Sep 27, 2023
bump
wen-zheng commentedon Oct 3, 2023
bump
detiam commentedon Oct 3, 2023
@wen-zheng seems the only way is let the app developer draw something like box-shadow around main window? kwin can't only add shadow for window when
server side decorationoff.electron app that have shadow on kwin: https://github.com/lyswhut/lx-music-desktop
44 remaining items
marbaa commentedon Dec 10, 2025
I think it is not rocket science to find out who should fix the problem. If application uses own theme/decoration, then logically drawing all window decorations (including shadows) must be handled by application and not by DE. Otherwise developer of custom application might blame DE that it screw up design of application or whatever. Thing that shadows were working on Mutter (not anymore), doesn't means that problem is on KDE. They might made some workaround.
I understand that KDE is not implementing any workaround fix. Stick to native theme which we provide or manage all decorations by youself.
ivoanjo commentedon Dec 10, 2025
@marbaa I realize this is an annoying bug but I'll gently point out to try to remember this project has a code of conduct https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md and that blaming people is probably not going to motivate a speedier fix.
sedax90 commentedon Dec 10, 2025
I don't think we can talk about a "speedier fix" after 3 years...
setzor commentedon Dec 22, 2025
bump
ja11sop commentedon Dec 23, 2025
Noting that as I understand it Mattermost desktop suffers from this (no shadow or border) on Plasma. It used to be possible to add a window rule to force adding native titlebar and borders which then allow the shadow to be drawn but now that doesn't even work. This is definitely an electron issue which seems to be affected by defaults use in apps like Mattermost. I suspect "better behaved" apps do some extra work and so things appear ok, but for some, like Mattermost - it is just broken. No shadows, no workaround (KDE Plasma 6.5.4, mattermost-desktop 6.0.2)
JerryI commentedon Dec 24, 2025
You may still provide platform info to DOM root element and draw on body 1px border line. Some apps do that (including mine), it improvs readability a lot, but no shadows...
heroin-moose commentedon Dec 25, 2025
Okay, to give some technical details. There is a Wayland protocol called xdg-decoration-unstable-v1. It controls whether an application window should draw the title bar and shadows itself or not. There is also older KDE-specific protocol called kde-server-decoration.
Now, what I'm seeing on Mattermost and Obsidian:
Mattermost 5.8 (Electron 29.3.0)
This means that the application requests server-side decorations.
Mattermost 5.9 (Electron 31.2.1)
This means that the application requests client-side decorations.
Same with Obsidian. However, it provides a setting to request SSD. In this case, KDE draws the decorations.
So, the application requests CSD, KDE provides CSD. The behavior probably changed between Electron 29 and Electron 31 (or between MM 5.8 and 5.9).
P.S. This change probably comes from Chrome, not Electron itself.
dominichayesferen commentedon Dec 25, 2025
That's literally just "can I has native titlebars?" the pseudo-standard basically, and has no part in this bug report as SSD-using Electron obviously is out of this issue's scope.
What needs to be done to fix this issue is to, like Chromium itself, simply render a shadow around the window then use set_window_geometry(?) to make the shadows out-of-bounds regarding actual window geometry. You'd also need to detect snapping and disable the shadow and change the window geometry, but that's part in parcel... that, or somehow just render the window the way Chromium renders PWA windows (which is what Electron seems to be trending towards anyways due to the Chromium titlebuttons usage).
heroin-moose commentedon Dec 25, 2025
It’s not obviously out of scope, that’s basically the reason why it worked before and does not work now. Where to go from here is obviously debatable.
heroin-moose commentedon Dec 26, 2025
Also documentation still mentions the old behavior as the default one: https://www.electronjs.org/docs/latest/tutorial/custom-title-bar
dominichayesferen commentedon Dec 26, 2025
Having server-side decorations (xdg-decorations protocol) means the compositor handles both the titlebar, and in the process the shadows, instead of the application, which is indeed out of scope for this bug as it is only about applications that don't opt into native titlebars but rather:
In both those CSD cases, not cases where a native titlebar is used instead when xdg-decorations is available, it is the application's job to render shadows around itself, thus what this bug is about (the lack of those very shadows it should be rendering).
I'd personally report a bug to the documentation regarding that information being outdated.
This all being said, getting the client-side decoration Electron to render shadows and have appropriate 'window geometry' is the most likely missing thing here that is causing this issue in Wayland, I'd assume (the non-standard
frame-extentsthat GNOME created in X11's case).heroin-moose commentedon Dec 27, 2025
Ah… I see what you mean. Yeah, kinda hijacked I guess, but given that Electron switched from SSD to CSD by default, this bug probably will become the catch-all for all “where is my usual KDE titlebar” due to it’s name.
detiam commentedon Feb 20, 2026
Edit: Confirm with Electron 43 that border shadow on KDE on x11 is working.
@ckerr @mitchchn But how about x11? KDE(Kwin) under x11 don't have server-side shadow for election, same as wayland. though mutter(Gnome/Ubuntu) has.
https://github.com/electron/electron/pull/49295/changes#diff-072c60761ff5134318cd284d5a04c6e72cf08166629adaab3e9034151b52439cR30-R34
Maybe Kwin x11 uses LinuxCSDFrameLayout too?
cquasar commentedon May 1, 2026
A workaround I've been using:
Alt + f3 » More Actions » Configure Special Application Settings » Add Property » No titlebar and frame: Foce = No
Before closing the popup copy the Window class (application) string
Then on System Settings » Window Decorations » Edit icon on selected decoration » Add Window specific overwrite » Matching window property: Window Class Name » Paste Window class into "Regular expression to match" (you can also use the button Detect Window Properties) » Hide window title bar: Always