Commit graph

65 commits

Author SHA1 Message Date
Martin Gräßlin
447fed7e37 Adjust DecoratedClientImpl to changes in DecoratedClientPrivate 2014-10-23 10:56:43 +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
21dca7ac14 Keep a QPointer<DecoratedClientImpl> in Client
This allows to remove the internal access to the DecoratedClientPrivate
in the KDecoration API.
2014-10-21 07:46:44 +02:00
Martin Gräßlin
c0c57d7076 KDecoration2::DecorationBridge uses std::unique_ptr 2014-10-20 17:42:50 +02:00
Martin Gräßlin
b22317458c Override ::reparent in X11Renderer
Required to stop and disconnect the timer. Otherwise it's possible
that the render is invoked after the Client got destroyed. This
happened for example with e.g. opening Kickoff.
2014-08-11 11:41:08 +02:00
Martin Gräßlin
689a3a1c5e Emit signals from Client when allowed actions change 2014-07-25 14:02:27 +02:00
Martin Gräßlin
2b20aa8bd0 Drop CoordinateMode from Client::layoutDecorationRects
It's unused without the padding.
2014-07-25 14:02:27 +02:00
Martin Gräßlin
a903fb2c64 Implement borderingScreenEdges for the DecoratedClientImpl
Uses the QuickTileMode of the Client to indicate which borders to
remove. This could be extended to be in general when a window borders
the screen edge and not just for quick tile mode.
2014-07-25 14:02:27 +02: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
c8c0bace31 Destroy DecorationRenderer in setup/finish compositing
So far the DecorationRenderer got destroyed and recreated after
the signal compositing toggled was emitted. But that's too late for
e.g. the OpenGL Textures to be destroyed. So lets trigger the destroy
directly in setup/finish compositing. The new renderer will still be
created after the compositing toggled is emitted - we don't want to
have it recreated for the still active compositer type.
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
c12199a8e0 Pass Decoration::Renderer to Deleted and use it in the Scenes
The Renderer gets reparented to the Deleted. While passing it to
the Deleted the Scene's implementation can ensure that the buffers
are up to date. After passing to Deleted it's no longer allowed to
call the render method.
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
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