From 8ce52d5cc06192226d0d783356c4cf212fadf5ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B6glund?= Date: Tue, 16 Mar 2010 16:37:08 +0000 Subject: [PATCH] Check if the decoration pixmaps need to be resized before resizing them. svn path=/trunk/KDE/kdebase/workspace/; revision=1104070 --- client.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/client.cpp b/client.cpp index 42a3a8cafd..982ac9b202 100644 --- a/client.cpp +++ b/client.cpp @@ -577,10 +577,18 @@ void Client::resizeDecorationPixmaps() QRect lr, rr, tr, br; layoutDecorationRects( lr, tr, rr, br, DecorationRelative ); - decorationPixmapTop = QPixmap( tr.size() ); - decorationPixmapBottom = QPixmap( br.size() ); - decorationPixmapLeft = QPixmap( lr.size() ); - decorationPixmapRight = QPixmap( rr.size() ); + if ( decorationPixmapTop.size() != tr.size() ) + decorationPixmapTop = QPixmap( tr.size() ); + + if ( decorationPixmapBottom.size() != br.size() ) + decorationPixmapBottom = QPixmap( br.size() ); + + if ( decorationPixmapLeft.size() != lr.size() ) + decorationPixmapLeft = QPixmap( lr.size() ); + + if ( decorationPixmapRight.size() != rr.size() ) + decorationPixmapRight = QPixmap( rr.size() ); + #ifdef HAVE_XRENDER if ( Extensions::renderAvailable() ) { // Make sure the pixmaps are created with alpha channels