/usr/share/kde4/apps/kwin/effects/kwin4_effect_login/contents/code/main.js is in kde-window-manager-common 4:4.11.8-0ubuntu6.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | /********************************************************************
KWin - the KDE window manager
This file is part of the KDE project.
Copyright (C) 2007 Lubos Lunak <l.lunak@kde.org>
Copyright (C) 2013 Martin Gräßlin <mgraesslin@kde.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
/*global effect, effects, animate, animationTime, Effect*/
var loginEffect = {
duration: animationTime(2000),
isFadeToBlack: false,
loadConfig: function () {
"use strict";
loginEffect.isFadeToBlack = effect.readConfig("FadeToBlack", false);
},
isLoginSplash: function (window) {
"use strict";
var windowClass = window.windowClass;
if (windowClass === "ksplashx ksplashx") {
return true;
}
if (windowClass === "ksplashsimple ksplashsimple") {
return true;
}
if (windowClass === "qt-subapplication ksplashqml") {
return true;
}
return false;
},
fadeOut: function (window) {
"use strict";
animate({
window: window,
duration: loginEffect.duration,
type: Effect.Opacity,
from: 1.0,
to: 0.0
});
},
fadeToBlack: function (window) {
"use strict";
animate({
window: window,
duration: loginEffect.duration / 2,
animations: [{
type: Effect.Brightness,
from: 1.0,
to: 0.0
}, {
type: Effect.Opacity,
from: 1.0,
to: 0.0,
delay: loginEffect.duration / 2
}, {
// TODO: is there a better way to keep brightness constant?
type: Effect.Brightness,
from: 0.0,
to: 0.0,
delay: loginEffect.duration / 2
}]
});
},
closed: function (window) {
"use strict";
if (!loginEffect.isLoginSplash(window)) {
return;
}
if (loginEffect.isFadeToBlack === true) {
loginEffect.fadeToBlack(window);
} else {
loginEffect.fadeOut(window);
}
},
init: function () {
"use strict";
effect.configChanged.connect(loginEffect.loadConfig);
effects.windowClosed.connect(loginEffect.closed);
loginEffect.loadConfig();
}
};
loginEffect.init();
|