10 Commits (a311f9bfda412b74bdf243b1988c0550250351ca)

Author SHA1 Message Date
Martin Gräßlin cb400d7128 DecorationBridge creates Decoration for AbstractClient 9 years ago
Martin Gräßlin a002442224 [decorations] Bring back option NoPlugin
The option NoPlugin allows to disable window decoration plugins. It
used to exist with the old decoration library but got unfortunately
lost during the switch.

This change brings back the option and also allows runtime changes
of the option.

REVIEW: 124708
9 years ago
Martin Gräßlin 468b5a32ff Add supportInformation for new Decorations
Following information is included:
* selected plugin
* selected theme
* all properties from KDecoration2::DecorationSettings
10 years ago
Martin Gräßlin fcec334b3c [kdecoration] Adjust to change that DecorationBridge is no longer a singleton
* Aurorae needs to pass QVariantList args to parent Decoration
* DecorationBridge implementation needs to be a KWIN_SINGLETON
* DecorationBridge needs to be passed with args to created Decoration
10 years ago
Martin Gräßlin a7bcb70980 [kdecoration2] Adjust to DecortionSettings no longer being a singleton 10 years ago
Martin Gräßlin 8f87e18b79 [decorations] Add support for runtime switching of decoration plugins 10 years ago
Martin Gräßlin 6a580d2b90 Support themes in decoration loading
A decoration plugin can indicate that it supports themes. For this
the decoration plugin needs to specify in the org.kde.kdecoration2
group of the JSON meta data the following:

themes: true,
defaultTheme: "nameofDefaultTheme"

If the themes key/value pair is present and set to true KWin will
read the entry "theme" in the [org.kde.kdecoration2] group with the
value of defaultTheme as the default value.

The read value (if there is one) is passed to the created decoration
in the QVariantList. The QVariantList contains a QVariantMap as first
entry and the theme name is passed for key "theme".
10 years ago
Martin Gräßlin c0c57d7076 KDecoration2::DecorationBridge uses std::unique_ptr 10 years ago
Martin Gräßlin a019fa259c Load decoration plugin settings from meta data
This brings back the value whether the decoration requires blur behind.
10 years ago
Martin Gräßlin 0030eb7f84 Initial import of support for new KDecoration2 based decorations
NOTE: this is not working completely yet, lots of code is still ifdefed
other parts are still broken.

The main difference for the new decoration API is that it is neither
QWidget nor QWindow based. It's just a QObject which processes input
events and has a paint method to render the decoration. This means all
the workarounds for the QWidget interception are removed. Also the paint
redirector is removed. Instead each compositor has now its own renderer
which can be optimized for the specific case. E.g. the OpenGL compositor
renders to a scratch image which gets copied into the combined texture,
the XRender compositor copies into the XPixmaps.

Input events are also changed. The events are composed into QMouseEvents
and passed through the decoration, which might accept them. If they are
not accpted we assume that it's a press on the decoration area allowing
us to resize/move the window. Input events are not completely working
yet, e.g. wheel events are not yet processed and double click on deco
is not yet working.

Overall KDecoration2 is way more stateful and KWin core needs more
adjustments for it. E.g. borders are allowed to be disabled at any time.
10 years ago