Changeset View
Changeset View
Standalone View
Standalone View
libtaskmanager/xwindowtasksmodel.cpp
Show First 20 Lines • Show All 301 Lines • ▼ Show 20 Line(s) | 289 | if (properties & (NET::WMState | NET::XAWMState)) { | |||
---|---|---|---|---|---|
302 | } else if (transientsDemandingAttention.remove(window)) { | 302 | } else if (transientsDemandingAttention.remove(window)) { | ||
303 | dataChanged(leader, QVector<int>{IsDemandingAttention}); | 303 | dataChanged(leader, QVector<int>{IsDemandingAttention}); | ||
304 | } | 304 | } | ||
305 | // Leader might have changed. | 305 | // Leader might have changed. | ||
306 | } else if (properties2 & NET::WM2TransientFor) { | 306 | } else if (properties2 & NET::WM2TransientFor) { | ||
307 | const KWindowInfo info(window, NET::WMState | NET::XAWMState, NET::WM2TransientFor); | 307 | const KWindowInfo info(window, NET::WMState | NET::XAWMState, NET::WM2TransientFor); | ||
308 | 308 | | |||
309 | if (info.hasState(NET::DemandsAttention)) { | 309 | if (info.hasState(NET::DemandsAttention)) { | ||
310 | WId oldLeader = info.transientFor(); | 310 | const WId leader = info.transientFor(); | ||
311 | WId oldLeader = 0; | ||||
graesslin: XCB_WINDOW_NONE | |||||
311 | QMutableHashIterator<WId, WId> i(transientsDemandingAttention); | 312 | QMutableHashIterator<WId, WId> i(transientsDemandingAttention); | ||
312 | 313 | | |||
313 | while (i.hasNext()) { | 314 | while (i.hasNext()) { | ||
314 | i.next(); | 315 | i.next(); | ||
315 | 316 | | |||
316 | if (i.value() == window) { | 317 | if (i.value() == window) { | ||
317 | oldLeader = i.key(); | 318 | oldLeader = i.key(); | ||
318 | i.remove(); | 319 | | ||
320 | break; | ||||
319 | } | 321 | } | ||
320 | } | 322 | } | ||
321 | 323 | | |||
322 | if (oldLeader != 0) { | 324 | if (oldLeader != 0 && leader != oldLeader) { | ||
323 | const WId leader = info.transientFor(); | 325 | i.remove(); | ||
324 | transientsDemandingAttention.insertMulti(leader, window); | 326 | transientsDemandingAttention.insertMulti(leader, window); | ||
325 | dataChanged(oldLeader, QVector<int>{IsDemandingAttention}); | 327 | dataChanged(oldLeader, QVector<int>{IsDemandingAttention}); | ||
326 | dataChanged(leader, QVector<int>{IsDemandingAttention}); | 328 | dataChanged(leader, QVector<int>{IsDemandingAttention}); | ||
327 | } | 329 | } | ||
328 | } | 330 | } | ||
329 | } | 331 | } | ||
330 | } | 332 | } | ||
331 | 333 | | |||
▲ Show 20 Lines • Show All 1010 Lines • Show Last 20 Lines |
XCB_WINDOW_NONE