kwin/effects/cube
Igor Poboiko 6408e0ba60 [effects/cube] Fix animation and reflection issues
The main problem was that inside the effect there was manualVerticalAngle,
which did not represent the actual rotation angle of the cube during the
animation, but used to calculate the position of the reflection. The actual
angle was calculated on-the-fly and was not exposed outside.

Brief description of what the code does:

- variables currentAngle and verticalCurrentAngle now always represent the
current position of the cube. They are updated when one uses the mouse and
inside the rotateCube() method, which is called in prePaintScreen().
- two queues, animations (used for Start / Stop / Left / Right) and
verticalAnimations (used for Up / Down) are used for scheduling the animations
if i.e. user presses several keys in a row. The code checks whether the last
animation has finished (and thus we need to start a new one) inside
prePaintScreen() and postPaintScreen()
 - when the animation starts, code saves the starting position of the cube
inside startAngle, startFrontDesktop and verticalStartAngle variables, which
are used to calculate the actual cube position during the animation later.
This is done by startAnimation() and startVerticalAnimation(), which also
calculates the QTimeLine curves needed for animation

BUG: 213599
BUG: 373101

Differential Revision: https://phabricator.kde.org/D9860
2018-06-01 18:32:27 +03:00
..
data
CMakeLists.txt
cube.cpp [effects/cube] Fix animation and reflection issues 2018-06-01 18:32:27 +03:00
cube.h [effects/cube] Fix animation and reflection issues 2018-06-01 18:32:27 +03:00
cube.kcfg
cube_config.cpp
cube_config.desktop
cube_config.h
cube_config.ui
cube_inside.h
cube_proxy.cpp
cube_proxy.h
cubeconfig.kcfgc
cubeslide.cpp
cubeslide.h
cubeslide.kcfg
cubeslide_config.cpp
cubeslide_config.desktop
cubeslide_config.h
cubeslide_config.ui
cubeslideconfig.kcfgc