From 670dcbfc5e8a4d903bcd164219498b334125f444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sun, 12 Jul 2009 15:20:16 +0000 Subject: [PATCH] Sync from oxygen: Delete the old tileset whenever a new one is created. That prevents that kwin eats more and more pixmaps. svn path=/trunk/KDE/kdebase/workspace/; revision=995380 --- clients/ozone/oxygenclient.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/clients/ozone/oxygenclient.cpp b/clients/ozone/oxygenclient.cpp index 04e679c4ae..067de06f34 100644 --- a/clients/ozone/oxygenclient.cpp +++ b/clients/ozone/oxygenclient.cpp @@ -90,6 +90,8 @@ void renderDot(QPainter *p, const QPointF &point, qreal diameter) OxygenClient::OxygenClient(KDecorationBridge *b, KDecorationFactory *f) : KCommonDecorationUnstable(b, f) , colorCacheInvalid_(true) + , shadowTiles_(NULL) + , glowTiles_(NULL) , helper_(*globalHelper) { qAddPostRoutine(oxkwincleanupBefore); @@ -97,6 +99,8 @@ OxygenClient::OxygenClient(KDecorationBridge *b, KDecorationFactory *f) OxygenClient::~OxygenClient() { + delete glowTiles_; + delete shadowTiles_; } QString OxygenClient::visibleName() const { @@ -571,6 +575,9 @@ TileSet *OxygenClient::shadowTiles(const QColor& color, const QColor& glow, qrea tileSet = new TileSet(shadow, size, size, 1, 1); glowTilesOption_ = opt; + if (glowTiles_) { + delete glowTiles_; + } glowTiles_ = tileSet; } else { //--------------------------------------------------------------- @@ -635,6 +642,9 @@ TileSet *OxygenClient::shadowTiles(const QColor& color, const QColor& glow, qrea tileSet = new TileSet(shadow, size, size, 1, 1); shadowTilesOption_ = opt; + if (shadowTiles_) { + delete shadowTiles_; + } shadowTiles_ = tileSet; } return tileSet;