[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:
parent
c99d329125
commit
2eded91897
1 changed files with 1 additions and 2 deletions
|
@ -677,8 +677,7 @@ void CoverSwitchEffect::paintWindowCover(EffectWindow* w, bool reflectedWindow,
|
||||||
if (reflectedWindow) {
|
if (reflectedWindow) {
|
||||||
QMatrix4x4 reflectionMatrix;
|
QMatrix4x4 reflectionMatrix;
|
||||||
reflectionMatrix.scale(1.0, -1.0, 1.0);
|
reflectionMatrix.scale(1.0, -1.0, 1.0);
|
||||||
data.setProjectionMatrix(data.screenProjectionMatrix());
|
data.setModelViewMatrix(reflectionMatrix*data.modelViewMatrix());
|
||||||
data.setModelViewMatrix(reflectionMatrix);
|
|
||||||
data.setYTranslation(- area.height() - windowRect.y() - windowRect.height());
|
data.setYTranslation(- area.height() - windowRect.y() - windowRect.height());
|
||||||
if (start) {
|
if (start) {
|
||||||
data.multiplyOpacity(timeLine.currentValue());
|
data.multiplyOpacity(timeLine.currentValue());
|
||||||
|
|
Loading…
Reference in a new issue