[effects/coverswitch] Fix broken reflection on multi-monitor setup

ModelViewMatrix used to paint windows (which is aware about
multi-monitor configuration) was overriden by reflectionMatrix when
painting reflections, leading to wrong placement of reflections.
Now we just multiply old matrix and reflection matrix.

BUG: 378688

Differential Revision: https://phabricator.kde.org/D10465
This commit is contained in:
Igor Poboiko 2018-03-25 13:26:50 +03:00 committed by Fabian Vogt
parent c99d329125
commit 2eded91897

View file

@ -677,8 +677,7 @@ void CoverSwitchEffect::paintWindowCover(EffectWindow* w, bool reflectedWindow,
if (reflectedWindow) {
QMatrix4x4 reflectionMatrix;
reflectionMatrix.scale(1.0, -1.0, 1.0);
data.setProjectionMatrix(data.screenProjectionMatrix());
data.setModelViewMatrix(reflectionMatrix);
data.setModelViewMatrix(reflectionMatrix*data.modelViewMatrix());
data.setYTranslation(- area.height() - windowRect.y() - windowRect.height());
if (start) {
data.multiplyOpacity(timeLine.currentValue());