kwin/autotests/integration/effects/scripts/completeTest.js
Vlad Zahorodnii 2ff0fc26a4 Merge EffectWindow::{windowMinimized,windowUnminimized}
The main motivation is to match the Window API.
2023-11-21 18:20:02 +00:00

22 lines
534 B
JavaScript

effects.windowAdded.connect(function (window) {
window.animation = set({
window: window,
curve: QEasingCurve.Linear,
duration: animationTime(1000),
type: Effect.Opacity,
from: 0,
to: 1,
keepAlive: false
});
window.minimizedChanged.connect(() => {
if (!window.minimized) {
return;
}
if (complete(window.animation)) {
sendTestResponse('ok');
} else {
sendTestResponse('fail');
}
});
});