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=995379
This commit is contained in:
parent
38e2261631
commit
dc702e2e3c
1 changed files with 10 additions and 0 deletions
|
@ -88,6 +88,8 @@ void renderDot(QPainter *p, const QPointF &point, qreal diameter)
|
||||||
OxygenClient::OxygenClient(KDecorationBridge *b, KDecorationFactory *f)
|
OxygenClient::OxygenClient(KDecorationBridge *b, KDecorationFactory *f)
|
||||||
: KCommonDecorationUnstable(b, f)
|
: KCommonDecorationUnstable(b, f)
|
||||||
, colorCacheInvalid_(true)
|
, colorCacheInvalid_(true)
|
||||||
|
, shadowTiles_(NULL)
|
||||||
|
, glowTiles_(NULL)
|
||||||
, helper_(*globalHelper)
|
, helper_(*globalHelper)
|
||||||
{
|
{
|
||||||
qAddPostRoutine(oxkwincleanupBefore);
|
qAddPostRoutine(oxkwincleanupBefore);
|
||||||
|
@ -95,6 +97,8 @@ OxygenClient::OxygenClient(KDecorationBridge *b, KDecorationFactory *f)
|
||||||
|
|
||||||
OxygenClient::~OxygenClient()
|
OxygenClient::~OxygenClient()
|
||||||
{
|
{
|
||||||
|
delete glowTiles_;
|
||||||
|
delete shadowTiles_;
|
||||||
}
|
}
|
||||||
QString OxygenClient::visibleName() const
|
QString OxygenClient::visibleName() const
|
||||||
{
|
{
|
||||||
|
@ -562,6 +566,9 @@ TileSet *OxygenClient::shadowTiles(const QColor& color, const QColor& glow, qrea
|
||||||
|
|
||||||
tileSet = new TileSet(shadow, size, size, 1, 1);
|
tileSet = new TileSet(shadow, size, size, 1, 1);
|
||||||
glowTilesOption_ = opt;
|
glowTilesOption_ = opt;
|
||||||
|
if (glowTiles_) {
|
||||||
|
delete glowTiles_;
|
||||||
|
}
|
||||||
glowTiles_ = tileSet;
|
glowTiles_ = tileSet;
|
||||||
} else {
|
} else {
|
||||||
//---------------------------------------------------------------
|
//---------------------------------------------------------------
|
||||||
|
@ -626,6 +633,9 @@ TileSet *OxygenClient::shadowTiles(const QColor& color, const QColor& glow, qrea
|
||||||
|
|
||||||
tileSet = new TileSet(shadow, size, size, 1, 1);
|
tileSet = new TileSet(shadow, size, size, 1, 1);
|
||||||
shadowTilesOption_ = opt;
|
shadowTilesOption_ = opt;
|
||||||
|
if (shadowTiles_) {
|
||||||
|
delete shadowTiles_;
|
||||||
|
}
|
||||||
shadowTiles_ = tileSet;
|
shadowTiles_ = tileSet;
|
||||||
}
|
}
|
||||||
return tileSet;
|
return tileSet;
|
||||||
|
|
Loading…
Reference in a new issue