Commit d61f3ec2 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

[effects/fade] Don't animate the logout screen

Summary:
The appearing of the logout screen is animated by both the Fade effect
and the Logout effect. The former should not animate the logout screen
because that's the job of the latter.

Test Plan:
Clicked the shut down button, the log out screen smoothly faded in.
Clicked the cancel button, the log out screen instantaneously disappeared.

Reviewers: #kwin, #plasma, davidedmundson

Reviewed By: #kwin, #plasma, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14582
parent 92880381
......@@ -18,17 +18,27 @@ 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/>.
*********************************************************************/
var blacklist = [
// The logout screen has to be animated only by the logout effect.
"ksmserver ksmserver",
// The splash screen has to be animated only by the login effect.
"ksplashqml ksplashqml",
"ksplashsimple ksplashsimple",
"ksplashx ksplashx"
];
function isFadeWindow(w) {
if (blacklist.indexOf(w.windowClass) != -1) {
return false;
}
if (w.deleted && effect.isGrabbed(w, Effect.WindowClosedGrabRole)) {
return false;
} else if (!w.deleted && effect.isGrabbed(w, Effect.WindowAddedGrabRole)) {
return false;
}
return w.onCurrentDesktop && !isLoginWindow(w) && !w.desktopWindow && !w.utility && !w.minimized;
}
function isLoginWindow(w) {
return w.windowClass == "ksplashx ksplashx" || w.windowClass == "ksplashsimple ksplashsimple" || w.windowClass == "ksplashqml ksplashqml";
return w.onCurrentDesktop && !w.desktopWindow && !w.utility && !w.minimized;
}
var fadeInTime, fadeOutTime, fadeWindows;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment