kwin/effects/sessionquit/package/contents/code/main.js

33 lines
873 B
JavaScript
Raw Normal View History

2020-08-02 22:22:19 +00:00
/*
KWin - the KDE window manager
This file is part of the KDE project.
2020-08-02 22:22:19 +00:00
SPDX-FileCopyrightText: 2019 David Edmundson <davidedmundson@kde.org>
2020-08-02 22:22:19 +00:00
SPDX-License-Identifier: GPL-2.0-or-later
*/
"use strict";
var quitEffect = {
closed: function (window) {
if (!window.desktopWindow || effects.sessionState != Globals.Quitting) {
return;
}
if (!effect.grab(window, Effect.WindowClosedGrabRole)) {
return;
}
window.outAnimation = animate({
window: window,
duration: 30 * 1000, // 30 seconds should be long enough for any shutdown
type: Effect.Generic, // do nothing, just hold a reference
from: 0.0,
to: 0.0
});
},
init: function () {
effects.windowClosed.connect(quitEffect.closed);
}
};
quitEffect.init();