[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/plasma
From:       Marco Martin <notmart () gmail ! com>
Date:       2011-01-15 17:51:56
Message-ID: 20110115175156.37C66AC8B4 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1214633 by mart:

a new private class EffectWatcher, used to be signaled when a particular KWin effect \
is enabled/disabled. in future could become public but only after has been proved is \
really correct


 M  +1 -0      CMakeLists.txt  
 A             private/effectwatcher.cpp   [License: LGPL (v2+)]
 A             private/effectwatcher_p.h   [License: LGPL (v2+)]
 M  +17 -1     theme.cpp  
 M  +1 -0      theme.h  


--- trunk/KDE/kdelibs/plasma/CMakeLists.txt #1214632:1214633
@@ -116,6 +116,7 @@
     private/dataengineconsumer.cpp
     private/dataengineservice.cpp
     private/denyallauthorization.cpp
+    private/effectwatcher.cpp
     private/extenderapplet.cpp
     private/extenderitemmimedata.cpp
     private/focusindicator.cpp
--- trunk/KDE/kdelibs/plasma/theme.cpp #1214632:1214633
@@ -28,6 +28,7 @@
 #include <QTimer>
 #ifdef Q_WS_X11
 #include <QX11Info>
+#include "private/effectwatcher_p.h"
 #endif
 
 #include <kcolorscheme.h>
@@ -85,6 +86,7 @@
           pixmapCache(0),
           locolor(false),
           compositingActive(KWindowSystem::compositingActive()),
+          blurActive(false),
           isDefault(false),
           useGlobal(true),
           hasWallpapers(false),
@@ -105,6 +107,9 @@
             compositeWatch = new KSelectionWatcher(net_wm_cm_name, -1, q);
             QObject::connect(compositeWatch, SIGNAL(newOwner(Window)), q, \
                SLOT(compositingChanged()));
             QObject::connect(compositeWatch, SIGNAL(lostOwner()), q, \
SLOT(compositingChanged())); +            //watch for blur effect property changes as \
well +            effectWatcher = new EffectWatcher(WindowEffects::BlurBehind);
+            QObject::connect(effectWatcher, SIGNAL(blurBehindChanged(bool)), q, \
SLOT(blurBehindChanged(bool)));  }
 #endif
 
@@ -116,6 +121,9 @@
     ~ThemePrivate()
     {
        delete pixmapCache;
+#ifdef Q_WS_X11
+       delete effectWatcher;
+#endif
     }
 
     KConfigGroup &config()
@@ -143,6 +151,7 @@
     void discardCache(CacheTypes caches);
     void scheduledCacheUpdate();
     void colorsChanged();
+    void blurBehindChanged(bool blur);
     bool useCache();
     void settingsFileChanged(const QString &);
     void setThemeName(const QString &themeName, bool writeSettings);
@@ -181,10 +190,12 @@
     QTimer *saveTimer;
 
 #ifdef Q_WS_X11
+    EffectWatcher *effectWatcher;
     KSelectionWatcher *compositeWatch;
 #endif
     bool locolor : 1;
     bool compositingActive : 1;
+    bool blurActive : 1;
     bool isDefault : 1;
     bool useGlobal : 1;
     bool hasWallpapers : 1;
@@ -257,7 +268,6 @@
 {
 #ifdef Q_WS_X11
     bool nowCompositingActive = compositeWatch->owner() != None;
-
     if (compositingActive != nowCompositingActive) {
         compositingActive = nowCompositingActive;
         discardCache(PixmapCache | SvgElementsCache);
@@ -316,6 +326,12 @@
     emit q->themeChanged();
 }
 
+void ThemePrivate::blurBehindChanged(bool blur)
+{
+    blurActive = blur;
+    emit q->themeChanged();
+}
+
 const QString ThemePrivate::processStyleSheet(const QString &css)
 {
     QString stylesheet;
--- trunk/KDE/kdelibs/plasma/theme.h #1214632:1214633
@@ -399,6 +399,7 @@
 
         Q_PRIVATE_SLOT(d, void compositingChanged())
         Q_PRIVATE_SLOT(d, void colorsChanged())
+        Q_PRIVATE_SLOT(d, void blurBehindChanged(bool blur))
         Q_PRIVATE_SLOT(d, void settingsFileChanged(const QString &))
         Q_PRIVATE_SLOT(d, void scheduledCacheUpdate())
         Q_PRIVATE_SLOT(d, void onAppExitCleanup())


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic