Commit graph

11 commits

Author SHA1 Message Date
Martin Gräßlin
757523a324 Use kwinApp()->config() instead of KSharedConfig::openConfig()
That way all over kwin we can inject a custom config in the autotests.
2016-01-29 11:24:18 +01:00
Martin Gräßlin
c8d814c11d Add ContextHelp button to default right buttons 2014-12-09 16:05:19 +01:00
Martin Gräßlin
521627396f [kcmkwin/deco] Reconfigure deco after applying changes
Required hooks also added to KWin core and Aurorae.
2014-12-05 15:58:05 +01:00
Martin Gräßlin
39f9581d4f Bring back configuration options for Decorations
* 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
2014-12-04 16:28:06 +01:00
Martin Gräßlin
f78ff8eaa5 Do not emit DecorationSettings::alphaChannelSupportedChanged on tear down
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.
2014-12-03 13:10:35 +01:00
Martin Gräßlin
106e595709 DecorationSettings provides QVector for decorationButtons 2014-12-01 11:53:44 +01:00
Martin Gräßlin
0cc86656c9 DecorationButtonType::QuickHelp -> DecorationButtonType::ContextHelp 2014-11-28 11:27:31 +01:00
Martin Gräßlin
796ac23672 Provide isCloseOnDoubleClickOnMenu in DecorationSettingsImpl
Needs proper implementation taking from config value.
2014-07-25 14:02:27 +02:00
Martin Gräßlin
b12d11a06c Add border size to the implementation of DecorationSettings
Not yet read from any config value.
2014-07-25 14:02:27 +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
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