Buttons are exported as a global "options" in the factory.
Additionally the theme's buttons are also exported. The thme decided
based on the custom button positions property which one to use.
In the kcm the button options are also exported.
Each decoration gets a graphicsview and scene instead and a declarative
item is created for each decoration.
There's probably still room for improvments. E.g. never render the
scene onto the widget but directly into the textures?
Switches to the explicit maximized decoration element and animates
the button groups and caption.
Legacy support for just the centered element is still missing. Unsure
if it should be added or if it makes sense to break compatibility here.
What's working:
* background for active and inactive decorations inclusive transitions
* all buttons get loaded
* transition between button states
* all borders, paddings etc is working
* mouse interaction with buttons and title area
What's not yet working:
* special maximize mode
* mouse wheel on title area
* window tabs
* changing themes
* crash resistence (currently a not compiling QML file crashes KWin badly)
* window/blur mask (tricky - we need the alpha mask of the background SVG)
What's going to be dropped:
* special opaque mode
* decoration position at left/right/bottom instead of top
Why? Because nobody uses these features
The effect did not check whether the ShaderManager is valid causing
a null pointer access when trying to use the shader.
Additionally this change moves the Shader init into the close window
slot as close window referrenced windows without checking whether the
effect would work. If the effect would not work each closed window
would be referrenced without any chance to being unreffed again as this
code is in a block checking whether the effect is valid.
BUG: 291390
FIXED-IN: 4.8.0
This is a condensed version of Martin's patch that fixes a high cpu
usage in KWin and X. It seems to be due to a window being created and
deleted at almost the same time, such that the fade effect never quits.
The bug was reliably reproducable with starting Amarok.
CCBUG: 290025
CCBUG: 288948
This patch reduces the number of QRegion and WindowQuadList operations
by drawing the opaque and translucent parts of the window within the
same bottom to top pass.
REVIEW: 103671