Commit graph

16 commits

Author SHA1 Message Date
Vlad Zagorodniy
3d46801e5f [wayland] Make sure that only the fading popups effect animates outline
Summary:
Window open/close animation effects should not animate the outline
because the end result is a bit awkward.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D19886
2019-04-09 14:21:22 +03:00
Vlad Zagorodniy
e86d8461ed [autotests] Test window open/close animations
Summary:
The idea behind this autotest is to verify that different window
open/close animation effects behave similarly.

Currently, we just check whether Fade/Glide/Scale effect tries to animate
the appearing or the disappearing of toplevels. In the future, the
autotest will be extended to verify that there are no conflicts between
those three effects and the Login/Logout effect, etc.

Test Plan: Ran the test, found a bug in the Fade effect, fixed it.

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17526
2018-12-14 21:11:42 +02:00
Vlad Zagorodniy
c98e6cb876 [effects] Split the Fade effect
Summary:
Currently, we have three effects that can be used to animate the
appearing of toplevel windows(fade, glide, scale) and one can enable
all three of them, which seems to be wrong. It doesn't make sense to have
glide and scale effect enabled, for example.

We couldn't put all three effects into an exclusive group before because
the fade effect animates not only toplevel windows but also popups. So,
if all three effects are in an exclusive group and you enable glide effect,
for example, then tooltips and other popups won't be faded in/out.

This patch splits the fade effect into two: the first effect (called Fade)
animates toplevel windows and the other one (called Fading Popups) animates
popup windows.

Test Plan:
Have been using the Fading Popups effect in combination with the Scale
effect for a couple of days. Haven't noticed any significant differences between
the new combination (Fading Popups + Scale) and the old combination
(Fade + Scale).

Reviewers: #kwin, #plasma, #vdg, graesslin

Reviewed By: #kwin, #plasma, graesslin

Subscribers: graesslin, abetts, ngraham, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16836
2018-11-15 19:01:33 +02:00
David Edmundson
a10647edf5 Disable fade effect during fullscreen effects
Summary:
This means that if one opens/closes a window whilst present windows (for
example) is active we don't have two effects meddling with the opacity.

Like glide and scale this disables if it's invoked during an active full
screen effect, but it does not cancel animations that are running when a
full screen effect is launched.

Test Plan:
Windows still fade normally as before
Ran sleep ; dolphin with present windows / cube
Present windows fades windows itself so it's hard to see any difference
But it's more technically correct

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15933
2018-10-04 13:05:51 +01:00
Vlad Zagorodniy
0a31feb321 [effects/logout] Animate ksmserver-logout-greeter
Summary:
On Wayland session, the logout screen has "ksmserver-logout-greeter
ksmserver-logout-greet" window class, so let's animate it too.

Test Plan:
* Started Wayland session;
* Pressed Ctrl+Alt+Del;
* (the logout screen smoothly faded in);
* Clicked the Cancel button;
* (the logout screen smoothly faded out)

* Started X11 session;
* Pressed Ctrl+Alt+Del;
* (the logout screen smoothly faded in);
* Clicked the Cancel button;
* (the logout screen smoothly faded out)

Reviewers: #kwin, #plasma, davidedmundson

Reviewed By: #kwin, #plasma, davidedmundson

Subscribers: davidedmundson, abetts, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14848
2018-08-19 22:12:00 +03:00
Vlad Zagorodniy
d61f3ec2d5 [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
2018-08-05 11:58:13 +03:00
Martin Gräßlin
451bbb54dd [effects] Handle windowShown and windowHidden in fade effect
Summary:
For Wayland windows we can have a sequence of window unmapped
(windowHidden signal) followed by a windowClosed way later when the
application quits. This is for example the case with menus.

The result of this was that the fade out animation triggered when the
application quit showing all the already closed menus again.

This change implements a windowShown and windowHidden handler and
triggers the fadeIn/Out animation on it. If the window gets shown
again the existing fadeOut animation gets cancelled, so that it can run
again.

If a window gets closed for which a fade out animation has been run
already, it's not triggered again, thus ensuring that we don't see
zombie windows.

CCBUG: 372622

Reviewers: #kwin, #plasma_on_wayland, hein

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3419
2016-11-22 07:18:27 +01:00
Martin Gräßlin
fb69b791a1 Ensure that all Effects honour the grab roles correctly
Summary:
When windows get added some effects grab the window and want to be the
only one animating this window. For this the grab roles exists. An
effect being notified later on evaluates the grab state and does not
start the animation.

This process failed due to being dependent on the order the effects are
loaded. Window Added/Closed are signals emitted by EffectsHandler, thus
first come, first serve. The requested effect order does not play into
it.

Due to that it could happen that an Effect which should not animate,
started to animate as the grab was still there.

This change adds the possibility to be notified whenever the window data
changes. A new signal is added to EffectsHandler which is emitted
whenever the windowData changes. The interested effects connect to it
and cancel their (just started) animation for the window.

Adjusted effects are:
* ScaleIn
* Fade
* WobblyWindows

In case of WobblyWindows an additional logical error was fixed that the
animations were only run when an effect grabbed instead of the other way
around.

BUG: 336866
FIXED-IN: 5.8.4

Reviewers: #kwin, #plasma, broulik

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3211
2016-11-07 11:45:09 +01:00
Marco Martin
ad7e1f6260 don't do fadeout on ksplashqml 2014-04-23 13:24:37 +02:00
Thomas Lübking
11f5f0298d workaround bug #321897 by multiplying fadeout time
with 4 instead of just altering the default value
It seems the value is actually written for some ppl.

Worse: former patch didn't actually work as expected
anymore

CCBUG: 321897
2013-09-26 19:43:10 +02:00
Thomas Lübking
05bc5bfc0b extend fadeout animation duration to 600ms
compensated by a QuartOut shape, this keeps the
effect alive while the sheet or similar effects run
without much visual stretch

Covers issue until there's AnimationEffect::determine()

CCBUG: 321897
semi Fixed in 4.11.2
REVIEW: 111798
2013-09-24 21:31:07 +02:00
Martin Gräßlin
fb65e080dc Pass property minimized from Client to Deleted
Ensures that we can access the minimized property in Effects
which want to not animate a closed, minimized window.

Make use of it in the Fade Effect Script to not fade out a
minimized window which would mean showing the actual not
visible window.

BUG: 303891
FIXED-IN: 4.9.0
REVIEW: 105647
2012-07-22 10:06:30 +02:00
Thomas Lübking
34ba9411c9 use proper onCurrentDesktop instead of isOnCurrentDesktop
BUG: 302784
FIXED-IN: 4.9
REVIEW: 105394
2012-07-05 19:43:46 +02:00
Thomas Lübking
3ef69476e7 don't fade/out in windows on other desktops
BUG: 302101
FIXED-IN: 4.9
REVIEW: 105297
2012-06-18 22:12:04 +02:00
Martin Gräßlin
7c00ab45f7 Add default values to Fade Effect
Without default values readConfig returns undefined values
causing the effect not to work. This needs to be documented.
2012-04-09 11:26:51 +02:00
Martin Gräßlin
f8c0616574 Fade effect goes JavaScript
Our first effect written in JavaScript to replace an existing C++
effect. Fade effect has been chosen as it has shown to be problematic
in the past and would have needed a migration to AnimationEffect anyway.
2012-03-12 21:37:42 +01:00