x11: Avoid discarding the window pixmap for no reason

If the buffer size changes after creating or destroying the decoration,
the surface item will discard the pixmap.

If the buffer size remains the same, we can continue using old pixmap.
This commit is contained in:
Vlad Zahorodnii 2021-09-06 20:52:14 +03:00
parent 2ef53e7350
commit 748004d81e

View file

@ -1150,9 +1150,6 @@ void X11Client::createDecoration(const QRect& oldgeom)
resize(adjustedSize());
updateDecorationInputShape();
maybeCreateX11DecorationRenderer();
if (Compositor::compositing()) {
discardWindowPixmap();
}
Q_EMIT geometryShapeChanged(this, oldgeom);
}
@ -1165,8 +1162,6 @@ void X11Client::destroyDecoration()
maybeDestroyX11DecorationRenderer();
resize(adjustedSize());
move(grav);
if (Compositor::compositing())
discardWindowPixmap();
if (!isZombie()) {
Q_EMIT geometryShapeChanged(this, oldgeom);
}