Merge lp://qastaging/~mc-return/compiz/compiz.merge-fix1162484-original-cube-top-and-bottom-caps-not-deformed into lp://qastaging/compiz/0.9.9

Proposed by MC Return
Status: Superseded
Proposed branch: lp://qastaging/~mc-return/compiz/compiz.merge-fix1162484-original-cube-top-and-bottom-caps-not-deformed
Merge into: lp://qastaging/compiz/0.9.9
Diff against target: 235 lines (+44/-48)
1 file modified
plugins/cubeaddon/src/cubeaddon.cpp (+44/-48)
To merge this branch: bzr merge lp://qastaging/~mc-return/compiz/compiz.merge-fix1162484-original-cube-top-and-bottom-caps-not-deformed
Reviewer Review Type Date Requested Status
Daniel van Vugt Needs Resubmitting
Review via email: mp+156306@code.qastaging.launchpad.net

This proposal has been superseded by a proposal from 2013-04-02.

Commit message

Cube-addon (Cube Reflection and Deformation):

If the user disables "Draw top face"/"Draw bottom face"
we do not want to draw anything.

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".
In this case 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).

void CubeaddonScreen::CubeCap::load is just called by
CubeaddonScreen::changeCap, where cap->mFiles.size ()
is already checked, no need to check it again.

Removed redundant call to cScreen->damageScreen ().
If we draw the cube we are already damaging the screen, no
need to damage it again if we change the cap.

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

(LP: #1162484, LP: #1162711)

Description of the change

Note:
Bug #1162740 (also regarding the caps) is still open, so the caps functionality is just almost perfect... :(
I am hunting this bug as well, but am currently a bit stuck with it (I added details to
the bug report already).

To post a comment you must log in.
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Please re-target this for lp:compiz/0.9.10

review: Needs Resubmitting
3646. By MC Return

cScreen->damageScreen (); once the cap has been changed
(reverted removal)

3647. By MC Return

Moved the mFiles.size () check to CubeaddonScreen::CubeCap::load (...)

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

3648. By MC Return

Additional cleanup

Unmerged revisions

3648. By MC Return

Additional cleanup

3647. By MC Return

Moved the mFiles.size () check to CubeaddonScreen::CubeCap::load (...)

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

3646. By MC Return

cScreen->damageScreen (); once the cap has been changed
(reverted removal)

3645. By MC Return

If the user disables "Draw top face"/"Draw bottom face"
we do not want to draw anything

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

We need to clear the texture if no texture files are
specified

void CubeaddonScreen::CubeCap::load is just called by
CubeaddonScreen::changeCap, where cap->mFiles.size ()
is already checked, no need to check it again

Fixed indentation

Removed redundant brackets and newlines

3644. By MC Return

Cube-addon:
Only call cubeScreen->cubePaintBottom if there is no deformation
Declare and assign variables in one line, if possible
Minor cleanup

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches