Changeset View
Changeset View
Standalone View
Standalone View
effects/slideback/slideback.cpp
Show All 29 Lines | 27 | { | |||
---|---|---|---|---|---|
30 | connect(effects, SIGNAL(windowAdded(KWin::EffectWindow*)), SLOT(slotWindowAdded(KWin::EffectWindow*))); | 30 | connect(effects, SIGNAL(windowAdded(KWin::EffectWindow*)), SLOT(slotWindowAdded(KWin::EffectWindow*))); | ||
31 | connect(effects, SIGNAL(windowDeleted(KWin::EffectWindow*)), SLOT(slotWindowDeleted(KWin::EffectWindow*))); | 31 | connect(effects, SIGNAL(windowDeleted(KWin::EffectWindow*)), SLOT(slotWindowDeleted(KWin::EffectWindow*))); | ||
32 | connect(effects, SIGNAL(windowUnminimized(KWin::EffectWindow*)), SLOT(slotWindowUnminimized(KWin::EffectWindow*))); | 32 | connect(effects, SIGNAL(windowUnminimized(KWin::EffectWindow*)), SLOT(slotWindowUnminimized(KWin::EffectWindow*))); | ||
33 | connect(effects, SIGNAL(tabBoxAdded(int)), SLOT(slotTabBoxAdded())); | 33 | connect(effects, SIGNAL(tabBoxAdded(int)), SLOT(slotTabBoxAdded())); | ||
34 | connect(effects, SIGNAL(stackingOrderChanged()), SLOT(slotStackingOrderChanged())); | 34 | connect(effects, SIGNAL(stackingOrderChanged()), SLOT(slotStackingOrderChanged())); | ||
35 | connect(effects, SIGNAL(tabBoxClosed()), SLOT(slotTabBoxClosed())); | 35 | connect(effects, SIGNAL(tabBoxClosed()), SLOT(slotTabBoxClosed())); | ||
36 | } | 36 | } | ||
37 | 37 | | |||
38 | static inline bool windowsShareDesktop(EffectWindow *w1, EffectWindow *w2) | | |||
39 | { | | |||
40 | return w1->isOnAllDesktops() || w2->isOnAllDesktops() || w1->desktop() == w2->desktop(); | | |||
41 | } | | |||
42 | | ||||
43 | | ||||
44 | void SlideBackEffect::slotStackingOrderChanged() | 38 | void SlideBackEffect::slotStackingOrderChanged() | ||
45 | { | 39 | { | ||
46 | if (effects->activeFullScreenEffect() || m_tabboxActive) { | 40 | if (effects->activeFullScreenEffect() || m_tabboxActive) { | ||
47 | oldStackingOrder = effects->stackingOrder(); | 41 | oldStackingOrder = effects->stackingOrder(); | ||
48 | usableOldStackingOrder = usableWindows(oldStackingOrder); | 42 | usableOldStackingOrder = usableWindows(oldStackingOrder); | ||
49 | return; | 43 | return; | ||
50 | } | 44 | } | ||
51 | 45 | | |||
Show All 22 Lines | 67 | { | |||
74 | // Determine all windows on top of the activated one | 68 | // Determine all windows on top of the activated one | ||
75 | bool currentFound = false; | 69 | bool currentFound = false; | ||
76 | foreach (EffectWindow * tmp, oldStackingOrder) { | 70 | foreach (EffectWindow * tmp, oldStackingOrder) { | ||
77 | if (!currentFound) { | 71 | if (!currentFound) { | ||
78 | if (tmp == w) { | 72 | if (tmp == w) { | ||
79 | currentFound = true; | 73 | currentFound = true; | ||
80 | } | 74 | } | ||
81 | } else { | 75 | } else { | ||
82 | if (isWindowUsable(tmp) && windowsShareDesktop(tmp, w)) { | 76 | if (isWindowUsable(tmp) && tmp->isOnCurrentDesktop() && w->isOnCurrentDesktop()) { | ||
83 | // Do we have to move it? | 77 | // Do we have to move it? | ||
84 | if (intersects(w, tmp->geometry())) { | 78 | if (intersects(w, tmp->geometry())) { | ||
85 | QRect slideRect; | 79 | QRect slideRect; | ||
86 | slideRect = getSlideDestination(getModalGroupGeometry(w), tmp->geometry()); | 80 | slideRect = getSlideDestination(getModalGroupGeometry(w), tmp->geometry()); | ||
87 | effects->setElevatedWindow(tmp, true); | 81 | effects->setElevatedWindow(tmp, true); | ||
88 | elevatedList.append(tmp); | 82 | elevatedList.append(tmp); | ||
89 | motionManager.manage(tmp); | 83 | motionManager.manage(tmp); | ||
90 | motionManager.moveWindow(tmp, slideRect); | 84 | motionManager.moveWindow(tmp, slideRect); | ||
▲ Show 20 Lines • Show All 257 Lines • Show Last 20 Lines |