Bug 398572 - Shadowless notifications at startup
Summary: Shadowless notifications at startup
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (other bugs)
Version First Reported In: git master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-13 10:35 UTC by Vlad Zahorodnii
Modified: 2018-09-13 13:20 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 5.14.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vlad Zahorodnii 2018-09-13 10:35:38 UTC
At startup, notifications don't have shadows. Consecutive notifications have shadows.

See https://www.youtube.com/watch?v=DEp87SEzmKc

I did little investigation: it looks like notifications are mapped and then after several frames, KWin gets shadow, e.g.

* Draw frame
* Draw frame
* ...
* Draw frame
* Get shadow through ShadowInterface
* Draw frame

(so, when KWin gets the shadow, Scene::Window already has cached window quads, thus the shadow is not rendered)
Comment 1 David Edmundson 2018-09-13 11:16:57 UTC
Is this wayland only?
Comment 2 Vlad Zahorodnii 2018-09-13 11:18:53 UTC
(In reply to David Edmundson from comment #1)
> Is this wayland only?

Yes.
Comment 3 Vlad Zahorodnii 2018-09-13 11:20:08 UTC
... well, at least I can reproduce this only on Wayland. On X11, notifications have shadows.
Comment 4 David Edmundson 2018-09-13 11:28:21 UTC
Ok, so we have two bugs.


1) Technically one could add a shadow at any time (at least the spec doesn't forbid it) which your patch addresses

2) Plasma::Dialog is broken and needs fixing.
Comment 5 Patrick Silva 2018-09-13 12:35:58 UTC
krunner is also shadowless on first run under Wayland on neon dev unstable.
Comment 6 Vlad Zahorodnii 2018-09-13 13:20:19 UTC
Git commit 213239a0ea0a9c0967bb68d1eda7a8d4d6a09498 by Vlad Zagorodniy.
Committed on 13/09/2018 at 13:20.
Pushed by vladz into branch 'master'.

[shadow] Rebuild quads after creation of shadow

Summary:
If a shadow is installed for already rendered window, the shadow won't
be initially rendered because we don't rebuild window quad cache.
FIXED-IN: 5.14.0

Test Plan: Can't reproduce 398572 anymore.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15475

M  +8    -9    shadow.cpp

https://commits.kde.org/kwin/213239a0ea0a9c0967bb68d1eda7a8d4d6a09498