Diffusion KWin 653cea5f49e9

[effects/slidingpopups] Overhaul the animations data struct

Authored by zzag on Jul 15 2018, 7:57 AM.

Description

[effects/slidingpopups] Overhaul the animations data struct

Summary:
The existing Data struct has some serious problems:

(a) naming is not intuitive, SlideInterface uses more cleaner terminology

so let's use that (and because Wayland is the future);

(b) fadeInTime and fadeOutTime should be slideInDuration and slideOutDuration

respectively. The Sliding popups effect doesn't fade windows, it slides
them;

(c) mWindowsData should be m_animationsData because other parts of this

effect refer to it as "anim data"(e.g. setupAnimData).

This effect uses its own Location enum class instead of KWayland::
Server::SlideInterface::Location because it would be better to not
depend on platform specific data structures.

As a side effect, this change also fixes QHash abuse. The Sliding popups
effect is still hashing windows twice in prePaintWindow and paintWindow.
But I think that's acceptable because usually there would be only one
active sliding window.

CCBUG: 331118

Reviewers: KWin, davidedmundson

Reviewed By: KWin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: KWin

Differential Revision: https://phabricator.kde.org/D14301

Details