Everything that has nothing to do with rendering the window thumbnail
goes into an AbstractThumbnailItem.
This is a preparation step for adding a DesktopThumbnailItem.
Makes it a little bit easier to use a ThumbnailItem for a Client. E.g.
ThumbnailItem {
client: model.client
}
instead of mapping the windowIds, which is rather uncomfty.
Two new properties saturation and brightness are added to the
ThumbnailItem which can be set from QML.
The properties are honoured by the Scene when rendering the thumbnail.
If a KWin script uses a ThumbnailItem which gets created before the
Compositor is fully initialized the thumbnail is not shown at all because
the connect to windowAdded etc. will never happen.
Therefore connect to Compositor::compositingToggled to re-connect
whenever the compositing state changes.
REVIEW: 109310
ThumbnailItem tries to find the window where it is embedded in
through a context propery containing the window id of the declarative
view. This works fine for e.g. TabBox but not for Plasma.Dialog as
that opens a new window.
REVIEW: 104394
By default clip is enabled. This means that if the thumbnail would
overlap the "parent" window, it does not get rendered at all. If set
to false it will always be rendered. This is required for window strip
where the complete screen width is used, so overlap does not matter.
A new QML item "ThumbnailItem" is registered to the TabBox. The
C++ implementation finds the EffectWindow of the TabBox and adds
itself to the EffectWindow.
While rendering the EffectWindow the information for all registered
ThumbnailItems are extracted and the thumbnail is rendered on top
of the EffectWindow.
This has obvious limitations like you cannot put other QML items
on top of the thumbnail. Nevertheless it works well enough to
be a possible replacement for e.g. BoxSwitch effect.
When compositing is disabled an icon is rendered instead of the
Thumbnail.
One TabBox Layout inspired by BoxSwitch Effect is added. For the
KCM small pre-rendered items are used.
REVIEW: 103039