~compiz-team/compiz/0.9.10

Viewing all changes in revision 3647.

Cube-addon (Cube Reflection and Deformation):

If the user disables "Draw top face"/"Draw bottom face"
we do not want to draw anything (LP: #1162484).

The original, non-deformed caps will only work for the
non-deformed cube, so we can just use the original function
in that case.

We need to clear the texture if no texture files are
specified in "Image files", otherwise the old texture
would still be drawn, even if all image files are
removed (LP: #1162711).

Now we will default back and use the cube cap
colors and opacities defined in the "Desktop Cube" plugin
(if "Draw top/bottom face" are enabled only, see above).

This way the user can choose between (for top/bottom):

1. Do not draw a cube cap face at all
   ("Draw top/bottom face" option disabled)
2. Use color and opacity specified in "Desktop Cube"
   (empty images list)
3. Use a texture for the cap
   (image is in the list, which is default)

Removed redundant mCurrent = mCurrent % mFiles.size ();
calculation, this has already been done:
cap->mCurrent = (cap->mCurrent + change + count) % count;

count and change both need to be != 0 for mCurrent to change.

Fixed indentation, removed redundant brackets and newlines,
declaration and assignment of local variables in one line,
if possible, minor cleanup.

(LP: #1162484, LP: #1162711). Fixes: https://bugs.launchpad.net/bugs/1162484, https://bugs.launchpad.net/bugs/1162711.

Approved by PS Jenkins bot, Sam Spilsbury.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: