Changeset View
Changeset View
Standalone View
Standalone View
effects/flipswitch/flipswitch.cpp
Context not available. | |||||
129 | // using stacking order directly is not possible | 129 | // using stacking order directly is not possible | ||
---|---|---|---|---|---|
130 | // as not each window in stacking order is shown | 130 | // as not each window in stacking order is shown | ||
131 | // TODO: store list instead of calculating in each frame? | 131 | // TODO: store list instead of calculating in each frame? | ||
132 | foreach (EffectWindow * w, effects->stackingOrder()) { | 132 | const KWin::EffectWindowList stack = effects->stackingOrder(); | ||
133 | for (EffectWindow * w : stack) { | ||||
133 | if (m_windows.contains(w)) | 134 | if (m_windows.contains(w)) | ||
134 | tempList.append(w); | 135 | tempList.append(w); | ||
135 | } | 136 | } | ||
Context not available. | |||||
139 | 140 | | |||
140 | int tabIndex = index; | 141 | int tabIndex = index; | ||
141 | if (m_mode == TabboxMode) { | 142 | if (m_mode == TabboxMode) { | ||
142 | foreach (SwitchingDirection direction, m_scheduledDirections) { // krazy:exclude=foreach | 143 | for (SwitchingDirection direction : qAsConst(m_scheduledDirections)) { | ||
143 | if (direction == DirectionBackward) | 144 | if (direction == DirectionBackward) | ||
144 | index++; | 145 | index++; | ||
145 | else | 146 | else | ||
Context not available. | |||||
166 | m_flipOrderedWindows.append(w); | 167 | m_flipOrderedWindows.append(w); | ||
167 | } | 168 | } | ||
168 | } else { | 169 | } else { | ||
169 | foreach (SwitchingDirection direction, m_scheduledDirections) { // krazy:exclude=foreach | 170 | for (SwitchingDirection direction : qAsConst(m_scheduledDirections)) { | ||
170 | if (direction == DirectionForward) | 171 | if (direction == DirectionForward) | ||
171 | index++; | 172 | index++; | ||
172 | else | 173 | else | ||
Context not available. | |||||
231 | } | 232 | } | ||
232 | } | 233 | } | ||
233 | 234 | | |||
234 | foreach (EffectWindow *w, m_flipOrderedWindows) { | 235 | for (EffectWindow *w : qAsConst(m_flipOrderedWindows)) { | ||
235 | ItemInfo *info = m_windows.value(w,0); | 236 | ItemInfo *info = m_windows.value(w,0); | ||
236 | if (!info) | 237 | if (!info) | ||
237 | continue; | 238 | continue; | ||
Context not available. | |||||
515 | } | 516 | } | ||
516 | 517 | | |||
517 | m_mode = mode; | 518 | m_mode = mode; | ||
518 | foreach (EffectWindow * w, effects->stackingOrder()) { | 519 | const KWin::EffectWindowList stack = effects->stackingOrder(); | ||
520 | for (EffectWindow * w : stack) { | ||||
519 | if (isSelectableWindow(w) && !m_windows.contains(w)) | 521 | if (isSelectableWindow(w) && !m_windows.contains(w)) | ||
520 | m_windows[ w ] = new ItemInfo; | 522 | m_windows[ w ] = new ItemInfo; | ||
521 | } | 523 | } | ||
Context not available. |