Summary:
This is a change mostly for KWin (the Wayland compositor). The internal
Wayland connection is created after the QStyle is created in the case of
KWin. But both are created before the event dispatcher is run for the
first time. So delaying by one cycle makes it work for KWin and also all
other Wayland applications.
BUG: 372001
FIXED-IN: 5.8.4
Reviewers: #plasma, broulik, hpereiradacosta
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3239
Integrate with Wayland and create a ShadowManager if available.
With the ShadowManager it's possible to create a Shadow for a Surface.
The Wayland shadow is very similar to the X11 based one, so a lot of
code can be shared. The code is slightly refactored to share the common
code paths to create and destroy the shadow.
REVIEW: 127352
Breeze checks if shadows are supported by checking for a property on the
root window. This is set by kwin at some point after startup.
This leaves a gap for apps/plasmashell to start, determine shadows are
not supported and then never render them for the lifespan of that app.
It also can't handle window managers being replaced.
Not checking solves all the issues with limited drawback
REVIEW: 123284
- move all metrics shadowhelper
- handle light source from option
- make actual shadow size and offsets adjustable
- calculate 'effective' shadow size, and overlap, accordingly.