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 "effects.h"
#include "workspace.h"
#include "composite.h"
// Qt
#include <QtDeclarative/QDeclarativeContext>
#include <QtDeclarative/QDeclarativeEngine>
@ -40,10 +41,9 @@ ThumbnailItem::ThumbnailItem(QDeclarativeItem* parent)
, m_parentWindow(0)
{
setFlags(flags() & ~QGraphicsItem::ItemHasNoContents);
if (effects) {
connect(effects, SIGNAL(windowAdded(KWin::EffectWindow*)), SLOT(effectWindowAdded()));
connect(effects, SIGNAL(windowDamaged(KWin::EffectWindow*,QRect)), SLOT(repaint(KWin::EffectWindow*)));
}
Q_ASSERT(Compositor::isCreated());
connect(Compositor::self(), SIGNAL(compositingToggled(bool)), SLOT(compositingToggled()));
compositingToggled();
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()
{
findParentEffectWindow();

View file

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