On Saturday, July 2, 2016 3:17:49 PM CEST René J. V. Bertin wrote:
> Hi,
> 
> Rather than example minimal from-scratch KDecoration2 examples, is/are there
> examples showing how to write a sort of minimal KDecoration2->legacy
> wrapper/proxy (and then work from there modernising the code)?

One cannot have a wrapper/proxy. KDecoration was modelled around QWidget with 
KCommonDecoration using QPushButtons for the buttons. KDecoration2 doesn't 
depend on QWidgets any more and all it has is a QPainter based API for 
rendering and QEvents for input interaction. Wrapping the old decoration is 
not possible due to the QWidget dependency, KWin would not be able to render 
it.

How to port the code really depends on how the legacy decoration plugin is 
based. A code base which heavily depends on QWidget is difficult to port. A 
code 
base which has the rendering abstracted and uses KCommonDecoration is easier 
to port.

> 
> I presume that's not unlike how Oxygen was adapted?

Oxygen was KCommonDecoration based and had the rendering quite well abstracted 
due to the fact that it's shared with the widget style.

My suggestion for a port is to separate the drawing logic to have it free from 
QWidgets and then integrate it into a KDecoration2 code base.

Cheers
Martin

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel

Reply via email to