From b9653b4e95e771b3c50f24ec705cd93abcedae7f Mon Sep 17 00:00:00 2001 From: Vlad Zagorodniy Date: Wed, 10 Oct 2018 11:58:17 +0300 Subject: [PATCH] [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 --- .../effects/scripted_effects_test.cpp | 1 + .../scripts/fullScreenEffectTestGlobal.js | 21 +++++++++++++++++++ scripting/scriptedeffect.cpp | 3 +++ 3 files changed, 25 insertions(+) create mode 100644 autotests/integration/effects/scripts/fullScreenEffectTestGlobal.js diff --git a/autotests/integration/effects/scripted_effects_test.cpp b/autotests/integration/effects/scripted_effects_test.cpp index 97a9313a23..4e477b0aaf 100644 --- a/autotests/integration/effects/scripted_effects_test.cpp +++ b/autotests/integration/effects/scripted_effects_test.cpp @@ -360,6 +360,7 @@ void ScriptedEffectsTest::testFullScreenEffect_data() QTest::newRow("single") << "fullScreenEffectTest"; QTest::newRow("multi") << "fullScreenEffectTestMulti"; + QTest::newRow("global") << "fullScreenEffectTestGlobal"; } void ScriptedEffectsTest::testFullScreenEffect() diff --git a/autotests/integration/effects/scripts/fullScreenEffectTestGlobal.js b/autotests/integration/effects/scripts/fullScreenEffectTestGlobal.js new file mode 100644 index 0000000000..006e902c3a --- /dev/null +++ b/autotests/integration/effects/scripts/fullScreenEffectTestGlobal.js @@ -0,0 +1,21 @@ +effects['desktopChanged(int,int)'].connect(function(old, current) { + var stackingOrder = effects.stackingOrder; + for (var i=0; i animationSettings(QScriptContext *context, ScriptedEffe if (!(s.set & AnimationSettings::Delay)) { s.delay = settings.at(0).delay; } + if (!(s.set & AnimationSettings::FullScreen)) { + s.fullScreenEffect = settings.at(0).fullScreenEffect; + } s.metaData = 0; typedef QMap MetaTypeMap;