wayland: Fix clipped thumbnails of client-side decorated apps
The buffer offset for client-side decorated windows is not 0, this plus
mixing the frame position and the client size may result in clipped
thumbnails of client-side decorated applications, such as gedit, etc.
BUG: 428595
(cherry picked from commit e298caaa7a
)
icc-effect-5.20.5
parent
6acab64718
commit
038aa9d8d7
|
@ -1551,7 +1551,7 @@ QSharedPointer<GLTexture> OpenGLWindow::windowTexture()
|
|||
return QSharedPointer<GLTexture>(new GLTexture(*frame->texture()));
|
||||
} else {
|
||||
auto effectWindow = window()->effectWindow();
|
||||
QRect geo(pos(), window()->clientSize());
|
||||
const QRect geo = window()->clientGeometry();
|
||||
QSharedPointer<GLTexture> texture(new GLTexture(GL_RGBA8, geo.size()));
|
||||
|
||||
QScopedPointer<GLRenderTarget> framebuffer(new KWin::GLRenderTarget(*texture));
|
||||
|
@ -1562,14 +1562,10 @@ QSharedPointer<GLTexture> OpenGLWindow::windowTexture()
|
|||
GLRenderTarget::setVirtualScreenGeometry(geo);
|
||||
|
||||
QMatrix4x4 mvp;
|
||||
mvp.ortho(geo);
|
||||
mvp.ortho(geo.x(), geo.x() + geo.width(), geo.y(), geo.y() + geo.height(), -1, 1);
|
||||
|
||||
WindowPaintData data(effectWindow);
|
||||
data.setProjectionMatrix(mvp);
|
||||
QSizeF size(geo.size());
|
||||
data.setYScale(-1);
|
||||
data.setXTranslation(bufferOffset().x());
|
||||
data.setYTranslation(geo.height() + bufferOffset().y());
|
||||
|
||||
performPaint(Scene::PAINT_WINDOW_TRANSFORMED | Scene::PAINT_WINDOW_LANCZOS, geo, data);
|
||||
GLRenderTarget::popRenderTarget();
|
||||
|
|
Loading…
Reference in New Issue