File indexing completed on 2024-11-10 04:57:08

0001 /*
0002     KWin - the KDE window manager
0003     This file is part of the KDE project.
0004 
0005     SPDX-FileCopyrightText: 2019 David Edmundson <davidedmundson@kde.org>
0006 
0007     SPDX-License-Identifier: GPL-2.0-or-later
0008 */
0009 
0010 "use strict";
0011 
0012 var quitEffect = {
0013     closed: function (window) {
0014         if (!window.desktopWindow || effects.sessionState != Globals.Quitting) {
0015             return;
0016         }
0017         if (!effect.grab(window, Effect.WindowClosedGrabRole)) {
0018             return;
0019         }
0020         window.outAnimation = animate({
0021             window: window,
0022             duration: 30 * 1000, // 30 seconds should be long enough for any shutdown
0023             type: Effect.Generic, // do nothing, just hold a reference
0024             from: 0.0,
0025             to: 0.0
0026         });
0027     },
0028     init: function () {
0029         effects.windowClosed.connect(quitEffect.closed);
0030     }
0031 };
0032 quitEffect.init();