Changeset View
Changeset View
Standalone View
Standalone View
effects/slideback/slideback.cpp
Show First 20 Lines • Show All 301 Lines • ▼ Show 20 Line(s) | |||||
302 | { | 302 | { | ||
303 | QRect windowUnderGeometry = getModalGroupGeometry(windowUnder); | 303 | QRect windowUnderGeometry = getModalGroupGeometry(windowUnder); | ||
304 | return windowUnderGeometry.intersects(windowOverGeometry); | 304 | return windowUnderGeometry.intersects(windowOverGeometry); | ||
305 | } | 305 | } | ||
306 | 306 | | |||
307 | EffectWindowList SlideBackEffect::usableWindows(const EffectWindowList & allWindows) | 307 | EffectWindowList SlideBackEffect::usableWindows(const EffectWindowList & allWindows) | ||
308 | { | 308 | { | ||
309 | EffectWindowList retList; | 309 | EffectWindowList retList; | ||
310 | auto isWindowVisible = [] (const EffectWindow *window) { | ||||
311 | return window && effects->virtualScreenGeometry().intersects(window->geometry()); | ||||
312 | }; | ||||
310 | foreach (EffectWindow * tmp, allWindows) { | 313 | foreach (EffectWindow * tmp, allWindows) { | ||
311 | if (isWindowUsable(tmp)) { | 314 | if (isWindowUsable(tmp) && isWindowVisible(tmp)) { | ||
312 | retList.append(tmp); | 315 | retList.append(tmp); | ||
313 | } | 316 | } | ||
314 | } | 317 | } | ||
315 | return retList; | 318 | return retList; | ||
316 | } | 319 | } | ||
317 | 320 | | |||
318 | QRect SlideBackEffect::getModalGroupGeometry(EffectWindow *w) | 321 | QRect SlideBackEffect::getModalGroupGeometry(EffectWindow *w) | ||
319 | { | 322 | { | ||
Show All 15 Lines |