summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nopacity.c6
-rw-r--r--nopacity.h1
2 files changed, 6 insertions, 1 deletions
diff --git a/nopacity.c b/nopacity.c
index e4de4f8..38445c9 100644
--- a/nopacity.c
+++ b/nopacity.c
@@ -13,6 +13,7 @@
cNopacity::cNopacity(cImageCache *imgCache) : cSkin("nOpacity", &::Theme) {
displayMenu = NULL;
+ init = true;
config.LoadThemeSpecificConfigs();
config.SetThemeSpecificDefaults();
config.SetThemeSetup();
@@ -24,7 +25,6 @@ cNopacity::cNopacity(cImageCache *imgCache) : cSkin("nOpacity", &::Theme) {
fontManager->SetFonts();
this->imgCache = imgCache;
imgCache->CreateCache();
- imgCache->CreateCacheDelayed();
}
const char *cNopacity::Description(void) {
@@ -33,6 +33,10 @@ const char *cNopacity::Description(void) {
cSkinDisplayChannel *cNopacity::DisplayChannel(bool WithInfo) {
ReloadCaches();
+ if (init) {
+ imgCache->CreateCacheDelayed();
+ init = false;
+ }
return new cNopacityDisplayChannel(imgCache, WithInfo);
}
diff --git a/nopacity.h b/nopacity.h
index 5b20654..32ec4de 100644
--- a/nopacity.h
+++ b/nopacity.h
@@ -11,6 +11,7 @@ class cNopacity : public cSkin {
private:
cNopacityDisplayMenu *displayMenu;
cImageCache *imgCache;
+ bool init;
void ReloadCaches(void);
public:
cNopacity(cImageCache *imgCache);