3332b32101
Summary: One cannot use a non metatype frrom an external class inside an invokable. https://bugreports.qt.io/browse/QTBUG-58454 End result is the script engine arguments wouldn't match up and MOC would just use the default value. As far as I can tell this has been broken for 6 years. The global animate method that unboxes a QJSValue as an object is unaffected. No shipped kwin effect actually used it. To some extent we didn't even actually want to enforce the enum as we also accept custom value of ScriptedEffect::GuassianCurve, so it has been switched for an int. Test Plan: Unit test Reviewers: #kwin, broulik Reviewed By: broulik Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D14669
12 lines
342 B
JavaScript
12 lines
342 B
JavaScript
effects.windowAdded.connect(function(w) {
|
|
w.anim1 = effect.animate(w, Effect.Scale, 100, 1.4, 0.2, 0, QEasingCurve.OutQuad);
|
|
sendTestResponse(typeof(w.anim1) == "number");
|
|
});
|
|
|
|
effects.windowUnminimized.connect(function(w) {
|
|
cancel(w.anim1);
|
|
});
|
|
|
|
effects.windowMinimized.connect(function(w) {
|
|
retarget(w.anim1, 1.5, 200);
|
|
});
|