Commit Graph

9 Commits (a7bcb7098096422b502b10bbf4fb53d58b358b45)

Author SHA1 Message Date
Martin Gräßlin a7bcb70980 [kdecoration2] Adjust to DecortionSettings no longer being a singleton 2014-10-29 16:11:20 +01:00
Martin Gräßlin 8f87e18b79 [decorations] Add support for runtime switching of decoration plugins 2014-10-28 11:53:56 +01:00
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".
2014-10-24 13:05:41 +02:00
Martin Gräßlin a104d9dc62 Call ::init() on created KDecoration2::Decoration 2014-10-23 10:59:00 +02:00
Martin Gräßlin c23b3ac0d8 Drop usage of DecoratedClient::handle in DecorationBridge::update
We can find the Client for the Decoration without needing to go by
the handle.
2014-10-21 08:03:23 +02:00
Martin Gräßlin c0c57d7076 KDecoration2::DecorationBridge uses std::unique_ptr 2014-10-20 17:42:50 +02:00
Martin Gräßlin 24a4a87bac Load settings for KDecoration2 based plugins
* library to load
* decoration buttons (based on old KDecoration1 implementation)
2014-07-25 14:02:27 +02:00
Martin Gräßlin a019fa259c Load decoration plugin settings from meta data
This brings back the value whether the decoration requires blur behind.
2014-07-25 14:02:26 +02:00
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.
2014-07-25 14:02:26 +02:00