Created attachment 138909 [details] Dialog during fade out transition SUMMARY The dialog shadow vanishes during the window's fade out transition STEPS TO REPRODUCE 1. notify-send foo bar 2. wait for the notification to time out OBSERVED RESULT The popup fades out but immediately loses its shadow EXPECTED RESULT The popup fades out but has its shadow fade out like the rest of the dialog SOFTWARE/OS VERSIONS Linux/KDE Plasma: git master as of 2021-05-23 KDE Frameworks Version: 5.82 Qt Version: 5.15.2 ADDITIONAL INFORMATION Can be more easily observed by reducing animation speed
X11 or Wayland?
X11
It looks like the shadow is destroyed before the x11 window is unmapped or destroyed. iirc plasma dialog removes drop shadows before the window is destroyed. KWindowShadow has to be destroyed after the QWindow is unmapped or destroyed.
Can still reproduce on X11.
Dialog::~Dialog() { if (!QCoreApplication::instance()->closingDown()) { DialogShadows::self()->removeWindow(this); } we can either explicitly call hide() or make dialogshadows automagically remove things connected to QObject::destroyed and then kill this line (probably better?)
(In reply to Vlad Zahorodnii from comment #3) > It looks like the shadow is destroyed before the x11 window is unmapped or > destroyed. iirc plasma dialog removes drop shadows before the window is > destroyed. > > KWindowShadow has to be destroyed after the QWindow is unmapped or destroyed. actually DialogShadows already is connected to the window destroyed signal,so the line can be safely just be removed
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/plasma-framework/-/merge_requests/596
Git commit 1e4b8bc19d6c4b3a632b790e97f16aeb50336434 by Nate Graham, on behalf of Marco Martin. Committed on 08/09/2022 at 15:36. Pushed by ngraham into branch 'master'. don't remove the shadow on ~Dialog DialogShadows already connects to the destroyed signal of the wondow and already knows how to clean up when a window goes away. Removing it in ~Dialog does it too soon and will result in a missing shadow during the fadeout animation M +0 -4 src/plasmaquick/dialog.cpp https://invent.kde.org/frameworks/plasma-framework/commit/1e4b8bc19d6c4b3a632b790e97f16aeb50336434