D15175: [effects/cubeslide/wayland] Fix several cubeslide issues
Igor Poboiko <[email protected]>
| Newsgroups | gmane.comp.kde.devel.kwin |
|---|---|
| Message-ID | <[email protected]> |
poboiko created this revision. poboiko added a reviewer: KWin. poboiko added a project: KWin. Herald added a subscriber: kwin. poboiko requested review of this revision. REVISION SUMMARY This patch fixes bug 390366 <https://bugs.kde.org/show_bug.cgi?id=390366> (cubeslide doesn't work on wayland) and bug 361516 <https://bugs.kde.org/show_bug.cgi?id=361516> (panel on top caused weird black blurred rectangle) F6225819: cube_buggy_x11-2018-08-30_23.51.03.mkv <https://phabricator.kde.org/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. TEST PLAN F6225843: cube_fixed-2018-08-30_23.35.09.mkv <https://phabricator.kde.org/F6225843> (don't know if there is already a way to record a screen on wayland, so cannot post it). Tested with all possible combinations of options both on X11 and Wayland, everything works The only remaining issue is that desktop switch OSD also animates with cube if "Do not animate windows on all desktops" option is not checked. REPOSITORY R108 KWin REVISION DETAIL https://phabricator.kde.org/D15175 AFFECTED FILES effects/cube/cubeslide.cpp effects/cube/cubeslide.h To: poboiko, #kwin Cc: kwin, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart