Merge branch 'KDE/4.10'

Conflicts:
	kmenuedit/main.cpp
	solid/solid-actions-kcm/device-actions/solid-device-SerialInterface.desktop
This commit is contained in:
Martin Gräßlin 2013-03-12 09:31:06 +01:00
commit abfc697b97
2 changed files with 15 additions and 4 deletions

View file

@ -23,6 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "client.h" #include "client.h"
#include "effects.h" #include "effects.h"
#include "workspace.h" #include "workspace.h"
#include "composite.h"
// Qt // Qt
#include <QtDeclarative/QDeclarativeContext> #include <QtDeclarative/QDeclarativeContext>
#include <QtDeclarative/QDeclarativeEngine> #include <QtDeclarative/QDeclarativeEngine>
@ -40,10 +41,9 @@ ThumbnailItem::ThumbnailItem(QDeclarativeItem* parent)
, m_parentWindow(0) , m_parentWindow(0)
{ {
setFlags(flags() & ~QGraphicsItem::ItemHasNoContents); setFlags(flags() & ~QGraphicsItem::ItemHasNoContents);
if (effects) { Q_ASSERT(Compositor::isCreated());
connect(effects, SIGNAL(windowAdded(KWin::EffectWindow*)), SLOT(effectWindowAdded())); connect(Compositor::self(), SIGNAL(compositingToggled(bool)), SLOT(compositingToggled()));
connect(effects, SIGNAL(windowDamaged(KWin::EffectWindow*,QRect)), SLOT(repaint(KWin::EffectWindow*))); compositingToggled();
}
QTimer::singleShot(0, this, SLOT(init())); QTimer::singleShot(0, this, SLOT(init()));
} }
@ -51,6 +51,16 @@ ThumbnailItem::~ThumbnailItem()
{ {
} }
void ThumbnailItem::compositingToggled()
{
m_parent.clear();
if (effects) {
connect(effects, SIGNAL(windowAdded(KWin::EffectWindow*)), SLOT(effectWindowAdded()));
connect(effects, SIGNAL(windowDamaged(KWin::EffectWindow*,QRect)), SLOT(repaint(KWin::EffectWindow*)));
effectWindowAdded();
}
}
void ThumbnailItem::init() void ThumbnailItem::init()
{ {
findParentEffectWindow(); findParentEffectWindow();

View file

@ -60,6 +60,7 @@ private Q_SLOTS:
void init(); void init();
void effectWindowAdded(); void effectWindowAdded();
void repaint(KWin::EffectWindow* w); void repaint(KWin::EffectWindow* w);
void compositingToggled();
private: private:
void findParentEffectWindow(); void findParentEffectWindow();
qulonglong m_wId; qulonglong m_wId;