Summary:
There are several reasons why I "re-wrote" the Glide effect:
* it doesn't work correctly because it suffers from undesired perspective distortions: {F5914378}
The worst part is that windows are distorted so much on multiple monitor setups that it's hard to say whether that's glide animation.
* window close animation is not quite intuitive: if the close button is
located at the top and I click it, I would expect that window is
rotated around the bottom edge, not the top; (IMHO)
* it's too much distracting when working on something for quite good
amount of time: e.g. when editing photos, which involves a big number
of different dialogs;
* there are issues with deletion of QTimeLine;
* windows are not gracefully released if some other effect grabs them;
* its code doesn't follow common coding style in KWin.
So, the "new" Glide effect is more subtle, it's possible to have
different rotation edges for window open/close animations, it doesn't
animate special windows(like audio volume feedback), the code is simpler
and readable. Yet, there are some issues with QTimeLine, which are
common to all effects in KWin anyway.
### Demos
{F5889803}
//Window Open Animation//
{F5889804}
//Window Close Animation//
{F5889805, layout=center, size=full}
//KCM//
CCBUG: 394245
Test Plan:
* Enabled the Glide effect
* Closed System Settings
* Opened it again
Reviewers: #kwin, #plasma, #vdg, davidedmundson
Reviewed By: #kwin, #plasma, #vdg, davidedmundson
Subscribers: ngraham, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D13338
Summary:
The glide effect tried to not animate any window the SlidingPopups
effect animates. But it detected that in a very crude way. It announced
the KDE_SLIDE atom and checked for windows having that property set.
This has a few disadvantages:
* KWindowEffects::isEffectAvailable gets confused as an effect announces
support for SlidingPopups which doesn't provide SlidingPopups
* The approach can only work for X11 windows
* The approach causes X11 usage in the ctor
With this change the GlideEffect implements a slot for
EffectsHandler::windowDataChanged to detect that the SlidingPopupsEffect
grabbed the window. The X11 atom interaction is removed.
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D3296
xcbutils.h has quite a few inline only implementations such as Xcb::Atom,
the Wrappers, Xcb::Window and the convenient methods. Thus there is
nothing wrong with using it from the built-in Effects.
Xcb::Atom is used in Glide and Logout Effect to get the atom. To keep the
logic of the existing code it got extended by a bool isValid() which
gets the reply and returns true if the atom is set.
REVIEW: 117587
This method replaces the X-KDE-ORDERING property in the Effect's desktop
files. This change is a preparation step for integrating the new Effect
Loader which doesn't read the ordering information. Thus it needs to be
provided by the Effect itself so that the EffectsHandler can properly
insert it into the chain.
Also for the built-in Effects on the long run it doesn't make much sense
to install the desktop files. And binary plugin effects will migrate to
json metadata which also doesn't have the KService::Ptr. Thus overall it
simplifies to read this information directly from the Effect.
The supportInformation is extended to also read the properties
on all effects. In addition each effect can be queried just for
itself through D-Bus, e.g.:
qdbus org.kde.kwin /KWin supportInformationForEffect kwin4_effect_blur
All effects are extended to provide their configured and read
settings through properties. In some cases also important
runtime information is exposed.
REVIEW: 105977
BUG: 305338
FIXED-IN: 4.9.1
Each effect is able to declare itself as currently being active,
that is transforming windows or painting or screen or doing anything
during the current rendered frame.
This change eliminates the hottest path inside KWin identified by
callgrind.
REVIEW: 102449
Warnings were:
glide.h:74:16: warning: possible problem detected in invocation of delete operator:
glide.h:74:16: warning: invalid use of incomplete type 'struct QTimeLine'
glide.h:28:7: warning: forward declaration of 'struct QTimeLine'
glide.h:74:16: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined.
The KWin::TimeLine class was only a small wrapper around QTimeLine
without adding anything to QTimeLine what is not present in QTimeLine.
The initial idea was to make it possible to provide more curve shapes.
This is now obsoleted by Qt shipping more useful curves with QTimeLine.
So let's clean up a little bit and use QTimeLine directly instead of
the small wrapper.
All effects are adjusted to use QTimeLine directly.
Client and Unmanaged use a signal to notify that they are about to be closed.
The EffectsHandlerImpl is connected to those signals and emits the appropriate
windowClosed signal to which the effects are connected.
All previously existing windowAdded methods are renamed to slotWindowAdded.
EffectsHandlerImpl is connected to Workspace's clientAdded signal, which is
emitted a little bit earlier than the previous direct method call. This might
change behavior.
Another signal is added to Workspace to signal that an unmanaged is added.
* use TimeLine data memeber instead pointer to prevent leaking
* only setTransformed() if there's really a current animation, not if "a window we know is mapped"
* therefore use a poperty to know whether the effect manages a deleted window
* set the TRANSFORMED flag in prePaintWindow as it should be
BUG: 242693
svn path=/trunk/KDE/kdebase/workspace/; revision=1192387