Bug 426143 - Kwin didn't drop shadows in some cases:
Summary: Kwin didn't drop shadows in some cases:
Status: RESOLVED NOT A BUG
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-03 13:29 UTC by Giovanni Santoni
Modified: 2020-09-04 07:30 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Google chrome and popups (737.35 KB, image/png)
2020-09-03 13:29 UTC, Giovanni Santoni
Details
Qmmp no shadows (19.98 KB, image/png)
2020-09-03 13:32 UTC, Giovanni Santoni
Details
Intellij menus no shadow (144.44 KB, image/png)
2020-09-03 13:36 UTC, Giovanni Santoni
Details
Chrome with _KDE_NET_WM_SHADOW (111.00 KB, image/png)
2020-09-04 07:30 UTC, Giovanni Santoni
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Giovanni Santoni 2020-09-03 13:29:05 UTC
Created attachment 131389 [details]
Google chrome and popups

Kwin didn't drop shadows in some cases:

Google chrome main windows and popups.
Shaped windows i.e. android studio emulators.
Qmmp
Non gtk toolkit popups (i.e emacs using xaw3d or Intellij IDE using java)
Electron applications i.e. Visual Studio code or MS Teams client.





SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.73
Qt Version: 5.14.2

ADDITIONAL INFORMATION
Comment 1 Giovanni Santoni 2020-09-03 13:32:28 UTC
Created attachment 131391 [details]
Qmmp no shadows
Comment 2 Giovanni Santoni 2020-09-03 13:36:13 UTC
Created attachment 131392 [details]
Intellij menus no shadow
Comment 3 Giovanni Santoni 2020-09-03 13:39:12 UTC
Gnome mutter is able to draw correctly shadow in all those cases giving a more consistent desktop experience.
Comment 4 Vlad Zahorodnii 2020-09-03 14:11:26 UTC
Client-side decorated windows (Google Chrome and practically every electron app) must draw drop-shadows on their own. Please report this issue to Google Chrome developers.

Same goes to Intellij IDEA. It needs to draw drop-shadows for popups on its own or provide shadow tiles via our proprietary protocols [1] [2].

[1] https://community.kde.org/KWin/Shadow
[2] https://invent.kde.org/libraries/plasma-wayland-protocols/-/blob/master/src/protocols/shadow.xml
Comment 5 Giovanni Santoni 2020-09-03 14:34:13 UTC
Ok but as a workaround would be possible to provide a drop shadow effect (like the one before plasma 4.6) to provide shadows for all the applications which dont 
draw drop-shadows on their own?

If is in theory possible a would like to try to implement one on myself. 
Where i can find some documentation to start?
Comment 6 Vlad Zahorodnii 2020-09-04 06:28:52 UTC
You could fork the old shadow effect https://github.com/KDE/kde-workspace/tree/KDE/4.6/kwin/effects/shadow

If you'd like to have an example of an out of source tree effect, see https://github.com/zzag/kwin-effects-sliding-notifications

I hope this helps.
Comment 7 Giovanni Santoni 2020-09-04 07:30:09 UTC
Created attachment 131412 [details]
Chrome with _KDE_NET_WM_SHADOW
Comment 8 Giovanni Santoni 2020-09-04 07:30:59 UTC
Hi tank you for the link i will do some test immediately.
By the way i tried to manually add _KDE_NET_WM_SHADOW to google Chrome:


xprop -id 0x4600005 -f  _KDE_NET_WM_SHADOW 32c -set  _KDE_NET_WM_SHADOW 35651649,35651659,35651660,35651661,35651662,35651663,35651664,35651665,8,8,1,8

copying the id of the pixmaps and the offsets from the plasma panel and it works.