From 2eded918977f8c8cefdd5c938d11fc57dc9ce1fe Mon Sep 17 00:00:00 2001 From: Igor Poboiko Date: Sun, 25 Mar 2018 13:26:50 +0300 Subject: [PATCH] [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 --- effects/coverswitch/coverswitch.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/effects/coverswitch/coverswitch.cpp b/effects/coverswitch/coverswitch.cpp index 303782c1b1..463e13ec49 100644 --- a/effects/coverswitch/coverswitch.cpp +++ b/effects/coverswitch/coverswitch.cpp @@ -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());