[effects/slideback] Ignore windows which are not in visible area

Summary:
The PresentWindows effect does not hide the window to close the selected
window. Instead it moves it outside the visible area. As this is a
"special" KWin window it is on top of the stacking order and needs to be
ignored in the slideback effect.

Instead of doing a special casing for this window the effect is changed
to ignore windows outside the visible area in general. Windows outside
the visible area just don't make sense to block the slideback effect.

BUG: 381402
FIXED-IN: 5.10.4

Test Plan: Slideback works after using Present Windows effect

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D6468
This commit is contained in:
Martin Flöser 2017-07-02 14:26:53 +02:00
parent aefb5f4dd9
commit 24ff93854d

View file

@ -307,8 +307,11 @@ bool SlideBackEffect::intersects(EffectWindow* windowUnder, const QRect &windowO
EffectWindowList SlideBackEffect::usableWindows(const EffectWindowList & allWindows)
{
EffectWindowList retList;
auto isWindowVisible = [] (const EffectWindow *window) {
return window && effects->virtualScreenGeometry().intersects(window->geometry());
};
foreach (EffectWindow * tmp, allWindows) {
if (isWindowUsable(tmp)) {
if (isWindowUsable(tmp) && isWindowVisible(tmp)) {
retList.append(tmp);
}
}