add dbus debug "activeEffects"

REVIEW: 103572
CCBUG: 288948
CCBUG: 290025
icc-effect-5.14.5
Thomas Lübking 2011-12-29 23:33:45 +01:00
parent 38c54e7111
commit 3b2476850e
5 changed files with 24 additions and 0 deletions

View File

@ -275,6 +275,13 @@ void Workspace::toggleCompositing()
} }
} }
QStringList Workspace::activeEffects() const
{
if (effects)
return static_cast< EffectsHandlerImpl* >(effects)->activeEffects();
return QStringList();
}
void Workspace::updateCompositeBlocking(Client *c) void Workspace::updateCompositeBlocking(Client *c)
{ {
if (c) { // if c == 0 we just check if we can resume if (c) { // if c == 0 we just check if we can resume

View File

@ -1253,6 +1253,18 @@ void EffectsHandlerImpl::effectsChanged()
} }
} }
QStringList EffectsHandlerImpl::activeEffects() const
{
QStringList ret;
for(QVector< KWin::EffectPair >::const_iterator it = loaded_effects.constBegin(),
end = loaded_effects.constEnd(); it != end; ++it) {
if (it->second->isActive()) {
ret << it->first;
}
}
return ret;
}
EffectFrame* EffectsHandlerImpl::effectFrame(EffectFrameStyle style, bool staticSize, const QPoint& position, Qt::Alignment alignment) const EffectFrame* EffectsHandlerImpl::effectFrame(EffectFrameStyle style, bool staticSize, const QPoint& position, Qt::Alignment alignment) const
{ {
return new EffectFrameImpl(style, staticSize, position, alignment); return new EffectFrameImpl(style, staticSize, position, alignment);

View File

@ -170,6 +170,7 @@ public:
QStringList listOfEffects() const; QStringList listOfEffects() const;
QList<EffectWindow*> elevatedWindows() const; QList<EffectWindow*> elevatedWindows() const;
QStringList activeEffects() const;
public Q_SLOTS: public Q_SLOTS:
void slotClientGroupItemSwitched(EffectWindow* from, EffectWindow* to); void slotClientGroupItemSwitched(EffectWindow* from, EffectWindow* to);

View File

@ -81,5 +81,8 @@
<arg type="s" direction="in"/> <arg type="s" direction="in"/>
<arg type="b" direction="out"/> <arg type="b" direction="out"/>
</method> </method>
<method name="activeEffects">
<arg type="as" direction="out"/>
</method>
</interface> </interface>
</node> </node>

View File

@ -459,6 +459,7 @@ public:
void previousTileLayout(); void previousTileLayout();
bool stopActivity(const QString &id); bool stopActivity(const QString &id);
bool startActivity(const QString &id); bool startActivity(const QString &id);
QStringList activeEffects() const;
void setCurrentScreen(int new_screen); void setCurrentScreen(int new_screen);