Commit e3f0b537 authored by Igor Poboiko's avatar Igor Poboiko
Browse files

[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
parent 4eb6e84d
......@@ -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());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment