Commit e298caaa authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

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
parent a3cf1b92
......@@ -1539,7 +1539,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));
......@@ -1550,14 +1550,10 @@ QSharedPointer<GLTexture> OpenGLWindow::windowTexture()
QMatrix4x4 mvp;
mvp.ortho(geo.x(), geo.x() + geo.width(), geo.y(), geo.y() + geo.height(), -1, 1);
WindowPaintData data(effectWindow);
QSizeF size(geo.size());
data.setYTranslation(geo.height() + bufferOffset().y());
performPaint(Scene::PAINT_WINDOW_TRANSFORMED, geo, data);
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