Changeset View
Changeset View
Standalone View
Standalone View
effects/slidingpopups/slidingpopups.cpp
Show First 20 Lines • Show All 296 Lines • ▼ Show 20 Line(s) | 285 | { | |||
---|---|---|---|---|---|
297 | } | 297 | } | ||
298 | 298 | | |||
299 | startForShow(w); | 299 | startForShow(w); | ||
300 | } | 300 | } | ||
301 | 301 | | |||
302 | void SlidingPopupsEffect::startForShow(EffectWindow *w) | 302 | void SlidingPopupsEffect::startForShow(EffectWindow *w) | ||
303 | { | 303 | { | ||
304 | if (w->isOnCurrentDesktop() && mWindowsData.contains(w)) { | 304 | if (w->isOnCurrentDesktop() && mWindowsData.contains(w)) { | ||
305 | if (!w->data(WindowForceBackgroundContrastRole).isValid() && w->hasAlpha()) { | 305 | if (!w->data(WindowForceBackgroundContrastRole).toBool() && w->hasAlpha()) { | ||
306 | w->setData(WindowForceBackgroundContrastRole, QVariant(true)); | 306 | w->setData(WindowForceBackgroundContrastRole, QVariant(true)); | ||
307 | m_backgroundContrastForced.append(w); | 307 | m_backgroundContrastForced.append(w); | ||
308 | } | 308 | } | ||
309 | auto it = mDisappearingWindows.find(w); | 309 | auto it = mDisappearingWindows.find(w); | ||
310 | if (it != mDisappearingWindows.end()) { | 310 | if (it != mDisappearingWindows.end()) { | ||
311 | delete it.value(); | 311 | delete it.value(); | ||
312 | mDisappearingWindows.erase(it); | 312 | mDisappearingWindows.erase(it); | ||
313 | } | 313 | } | ||
Show All 29 Lines | 342 | if (mDisappearingWindows.contains(w)) { | |||
343 | return; | 343 | return; | ||
344 | } | 344 | } | ||
345 | mDisappearingWindows.insert(w, new QTimeLine(mWindowsData[ w ].fadeOutDuration, this)); | 345 | mDisappearingWindows.insert(w, new QTimeLine(mWindowsData[ w ].fadeOutDuration, this)); | ||
346 | mDisappearingWindows[ w ]->setCurveShape(QTimeLine::EaseInOutCurve); | 346 | mDisappearingWindows[ w ]->setCurveShape(QTimeLine::EaseInOutCurve); | ||
347 | 347 | | |||
348 | // Tell other windowClosed() effects to ignore this window | 348 | // Tell other windowClosed() effects to ignore this window | ||
349 | w->setData(WindowClosedGrabRole, QVariant::fromValue(static_cast<void*>(this))); | 349 | w->setData(WindowClosedGrabRole, QVariant::fromValue(static_cast<void*>(this))); | ||
350 | w->setData(WindowForceBlurRole, true); | 350 | w->setData(WindowForceBlurRole, true); | ||
351 | if (!w->data(WindowForceBackgroundContrastRole).isValid() && w->hasAlpha()) { | 351 | if (!w->data(WindowForceBackgroundContrastRole).toBool() && w->hasAlpha()) { | ||
352 | w->setData(WindowForceBackgroundContrastRole, QVariant(true)); | 352 | w->setData(WindowForceBackgroundContrastRole, QVariant(true)); | ||
353 | } | 353 | } | ||
354 | 354 | | |||
355 | w->addRepaintFull(); | 355 | w->addRepaintFull(); | ||
356 | } | 356 | } | ||
357 | m_backgroundContrastForced.removeAll(w); | 357 | m_backgroundContrastForced.removeAll(w); | ||
358 | } | 358 | } | ||
359 | 359 | | |||
▲ Show 20 Lines • Show All 139 Lines • Show Last 20 Lines |