Commit 038aa9d8 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

(cherry picked from commit e298caaa)
parent 6acab647
......@@ -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()
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 | Scene::PAINT_WINDOW_LANCZOS, geo, data);
Markdown is supported
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