effects/glide: Adjust the effect to projection matrix changes
With per-screen rendering, the projection matrix is no longer created with the workspace geometry, i.e. all screen geometries united, so the center of the workspace geometry may not map to (0, 0) in the clip coordinates. GLRenderTarget::virtualScreenGeometry() can be used to query the rect that was used to create the projection matrix. BUG: 442770
This commit is contained in:
parent
6d79d855be
commit
c29c437e58
1 changed files with 2 additions and 1 deletions
|
@ -12,6 +12,7 @@
|
|||
|
||||
// own
|
||||
#include "glide.h"
|
||||
#include "kwinglutils.h"
|
||||
|
||||
// KConfigSkeleton
|
||||
#include "glideconfig.h"
|
||||
|
@ -120,7 +121,7 @@ void GlideEffect::paintWindow(EffectWindow *w, int mask, QRegion region, WindowP
|
|||
data.setProjectionMatrix(invOffsetMatrix * oldProjMatrix);
|
||||
|
||||
// Move the center of the window to the origin.
|
||||
const QRectF screenGeo = effects->virtualScreenGeometry();
|
||||
const QRectF screenGeo = GLRenderTarget::virtualScreenGeometry();
|
||||
const QPointF offset = screenGeo.center() - windowGeo.center();
|
||||
data.translate(offset.x(), offset.y());
|
||||
|
||||
|
|
Loading…
Reference in a new issue