This patch fixes [[ https://bugs.kde.org/show_bug.cgi?id=390366 | bug 390366 ]] (cubeslide doesn't work on wayland) and [[ https://bugs.kde.org/show_bug.cgi?id=361516 | bug 361516 ]] (panel on top caused weird black blurred rectangle)
{F6225819}
The first bug happened because code (in addition to other checks) used EffectWindow::isManaged() to determine if a window should not be animated. I suppose it was used to detect fancy OSD and don't animate it.
However, on Wayland it just didn't work as expected: the whole desktop and Wayland windows are not managed. Thus, it painted cube, but then painted the desktop above.
Unfortunately, I didn't find an easy way to keep the functionality, and removed that check at all.
(well, there is an "internal window" property, but it works only on Wayland and is not exposed to EffectWindow; anyway, it looks a bit hack'ish to me)
The second bug occured (also on Wayland, btw) because KWin was not very happy when windows were painted during CubeSlideEffect::paintScreen().
Not sure why exactly, but I suppose it's intentional.
Another issue is that blur, although it was supposed to, did not work at all (haven't found appropriate bug on bugzilla). As well as background contrast effect.
This patch does the following thing:
- Adopted WindowForceBlur / WindowForceBackgroundContrast logic from SlideEffect, instead of panels/stickyWindows QSets (those become useless anyway)
- Added shouldAnimate code, which determines whether a window should be animated with the cube (i.e. ordinary windows) or should stick (i.e. panels or pinned windows, if corresponding options are checked in the settings)
- It paints an additional non-transformed screen, on which it paints only "sticky" windows. This is done because otherwise KWin would apply blur not behind the OSD, but on the same place on moving cube face.
- (in addition) switched to new Qt5 connect syntax.
BUG: 390366
BUG: 361516