This brings back the configuration for decoration plugins. As a change
to the old variant the configure button is moved into the list view
together with the preview. It is enabled/disabled depending on data
provided by the DecorationModel. For a plugin the DecorationModel
queries for a boolean "kcmodule" key in the metadata. For a theme it
invokes the slot hasConfiguration with the theme name which returns
whether the theme provides configuration.
The actual opening of the configuration is triggered from the
PreviewBridge, which uses the existing KPluginFactory to load the
KCModule. The decoration plugin must provide the keyword "kcmodule"
for it.
So far Aurorae is adjusted and provides configuration for the Plastik
decoration. The interaction with the configuration module works, but
the configuration itself for Plastik seems to be currently broken.
KNewStuff is no longer hard-coded to Aurorae themes. Instead the
availability of KNewStuff is derived from the available plugin
metadata. If the section org.kde.kdecoration2 contains a key
"KNewStuff" it's value is interpreted as the knsrc config file name.
If there is at least one plugin with such a key KNS gets enabled.
If there are multiple plugins providing KNS support the download
button is turned into a button with a connected menu and each menu
entry points to one of the available resources. Of course this is
not optimal, but KNS doesn't allow the combining of multiple config
files.
The cube effect was relying on paintWindow() using the generic shader
without explicitly telling it to do so. This makes the cube effect
work with dynamic shaders.
Effects currently modify the matrices by reading back the uniform
values from the shader they assume will be used to paint the window,
set new values for the uniforms, call paintWindow(), and then restore
the uniforms to their previous values.
This is both slow and unreliable, and will not work with dynamically
generated shaders.
This patch solves the problem by putting the matrices in
WindowPaintData and making it the responsibility of the paintWindow()
implementation to set the uniforms.
This adds new API in ShaderManager that makes it possible to request a
shader based on a set of traits. ShaderManager generates these shaders
on demand and caches them in a hash table.
* Border Sizes
* Close menu double click
Both are added to the Settings and exposed in the decoration kcm.
As it started to no longer scale the kcm uses a ui file.
Still missing:
* buttons
* custom decoration configuration
* GHNS
* search
The DecorationShadow supports the concept of sharing shadows between
multiple Decorations and this is supported by our Shadow class. But
still the created GLTextures were not shared.
This change introduces a sharing mechanismn for all GLTextures created
for a DecorationShadow. Thus if two decorations share the same
DecorationShadow they will also share the same GLTexture.
QQuickRenderControl brings a few advantages for the usage in Aurorae:
* can create an offscreen window
* eliminate the need for mutex as we control the rendering
* control the tear down of the QML scene (no more crashes in Qt)
In future we can further improve this, by sharing the context, so
that we can use the FBO texture directly. But this first needs
some more work in KWin core.
As we don't hard depend on Qt 5.4 yet it's using ifdefs. Once we have
Qt 5.4 the old code will be removed.
The Compositor is destroyed before the Client and Decorations are
destroyed on shutdown. This meant the Decorations reacted needlessly
on the alpha channel supported. E.g. Aurorae recreated the Decoration
and most likely crashed in Qt.
With this change the signal gets disconnected and the Decorations
just don't do anything.
When a Client gets created the ::createDecoration method is invoked
from ::manage which is called before the Client is added to the
ClientList in Workspace. Thus processing the update fails in the
DecorationBridge as it cannot find the Client.
By delaying to the end of the event cycle we can be sure that the
Client is completely managed and that the scheduled repaint doesn't
fail.
This fixes the missing repaint when a Client starts as inactive.