[scripting] Propagate fullScreenEffect from global settings to local settings
Test Plan: Ran the test. Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: davidedmundson, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D16097
This commit is contained in:
parent
51a727fc6b
commit
b9653b4e95
3 changed files with 25 additions and 0 deletions
|
@ -360,6 +360,7 @@ void ScriptedEffectsTest::testFullScreenEffect_data()
|
||||||
|
|
||||||
QTest::newRow("single") << "fullScreenEffectTest";
|
QTest::newRow("single") << "fullScreenEffectTest";
|
||||||
QTest::newRow("multi") << "fullScreenEffectTestMulti";
|
QTest::newRow("multi") << "fullScreenEffectTestMulti";
|
||||||
|
QTest::newRow("global") << "fullScreenEffectTestGlobal";
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScriptedEffectsTest::testFullScreenEffect()
|
void ScriptedEffectsTest::testFullScreenEffect()
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
effects['desktopChanged(int,int)'].connect(function(old, current) {
|
||||||
|
var stackingOrder = effects.stackingOrder;
|
||||||
|
for (var i=0; i<stackingOrder.length; i++) {
|
||||||
|
var w = stackingOrder[i];
|
||||||
|
//1 second long random animation, marked as fullscreen
|
||||||
|
w.anim1 = animate({
|
||||||
|
window: w,
|
||||||
|
duration: 1000,
|
||||||
|
fullScreen: true,
|
||||||
|
animations: [{
|
||||||
|
type: Effect.Scale,
|
||||||
|
curve: Effect.GaussianCurve,
|
||||||
|
to: 1.4
|
||||||
|
}, {
|
||||||
|
type: Effect.Opacity,
|
||||||
|
curve: Effect.GaussianCurve,
|
||||||
|
to: 0.0
|
||||||
|
}]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
|
@ -227,6 +227,9 @@ QList<AnimationSettings> animationSettings(QScriptContext *context, ScriptedEffe
|
||||||
if (!(s.set & AnimationSettings::Delay)) {
|
if (!(s.set & AnimationSettings::Delay)) {
|
||||||
s.delay = settings.at(0).delay;
|
s.delay = settings.at(0).delay;
|
||||||
}
|
}
|
||||||
|
if (!(s.set & AnimationSettings::FullScreen)) {
|
||||||
|
s.fullScreenEffect = settings.at(0).fullScreenEffect;
|
||||||
|
}
|
||||||
|
|
||||||
s.metaData = 0;
|
s.metaData = 0;
|
||||||
typedef QMap<AnimationEffect::MetaType, QString> MetaTypeMap;
|
typedef QMap<AnimationEffect::MetaType, QString> MetaTypeMap;
|
||||||
|
|
Loading…
Reference in a new issue