Changeset View
Changeset View
Standalone View
Standalone View
effects/presentwindows/presentwindows.cpp
Show First 20 Lines • Show All 283 Lines • ▼ Show 20 Line(s) | 281 | { | |||
---|---|---|---|---|---|
284 | if (m_activated || m_motionManager.areWindowsMoving() || m_closeWindow) { | 284 | if (m_activated || m_motionManager.areWindowsMoving() || m_closeWindow) { | ||
285 | DataHash::iterator winData = m_windowData.find(w); | 285 | DataHash::iterator winData = m_windowData.find(w); | ||
286 | if (winData == m_windowData.end()) { | 286 | if (winData == m_windowData.end()) { | ||
287 | effects->prePaintWindow(w, data, time); | 287 | effects->prePaintWindow(w, data, time); | ||
288 | return; | 288 | return; | ||
289 | } | 289 | } | ||
290 | w->enablePainting(EffectWindow::PAINT_DISABLED_BY_MINIMIZE); // Display always | 290 | w->enablePainting(EffectWindow::PAINT_DISABLED_BY_MINIMIZE); // Display always | ||
291 | w->enablePainting(EffectWindow::PAINT_DISABLED_BY_DESKTOP); | 291 | w->enablePainting(EffectWindow::PAINT_DISABLED_BY_DESKTOP); | ||
292 | if (winData->visible) | | |||
293 | w->enablePainting(EffectWindow::PAINT_DISABLED_BY_TAB_GROUP); | | |||
294 | 292 | | |||
295 | // Calculate window's opacity | 293 | // Calculate window's opacity | ||
296 | // TODO: Minimized windows or windows not on the current desktop are only 75% visible? | 294 | // TODO: Minimized windows or windows not on the current desktop are only 75% visible? | ||
297 | if (winData->visible) { | 295 | if (winData->visible) { | ||
298 | if (winData->deleted) | 296 | if (winData->deleted) | ||
299 | winData->opacity = qMax(0.0, winData->opacity - time / m_fadeDuration); | 297 | winData->opacity = qMax(0.0, winData->opacity - time / m_fadeDuration); | ||
300 | else | 298 | else | ||
301 | winData->opacity = qMin(/*(w->isMinimized() || !w->isOnCurrentDesktop()) ? 0.75 :*/ 1.0, | 299 | winData->opacity = qMin(/*(w->isMinimized() || !w->isOnCurrentDesktop()) ? 0.75 :*/ 1.0, | ||
▲ Show 20 Lines • Show All 1313 Lines • ▼ Show 20 Line(s) | 1608 | } else { | |||
1615 | EffectWindow *activeWindow = effects->activeWindow(); | 1613 | EffectWindow *activeWindow = effects->activeWindow(); | ||
1616 | int desktop = effects->currentDesktop(); | 1614 | int desktop = effects->currentDesktop(); | ||
1617 | if (activeWindow && !activeWindow->isOnAllDesktops()) | 1615 | if (activeWindow && !activeWindow->isOnAllDesktops()) | ||
1618 | desktop = activeWindow->desktop(); | 1616 | desktop = activeWindow->desktop(); | ||
1619 | foreach (EffectWindow * w, effects->stackingOrder()) { | 1617 | foreach (EffectWindow * w, effects->stackingOrder()) { | ||
1620 | DataHash::iterator winData = m_windowData.find(w); | 1618 | DataHash::iterator winData = m_windowData.find(w); | ||
1621 | if (winData != m_windowData.end()) | 1619 | if (winData != m_windowData.end()) | ||
1622 | winData->visible = (w->isOnDesktop(desktop) || w->isOnAllDesktops()) && | 1620 | winData->visible = (w->isOnDesktop(desktop) || w->isOnAllDesktops()) && | ||
1623 | !w->isMinimized() && (w->isCurrentTab() || winData->visible); | 1621 | !w->isMinimized(); | ||
1624 | } | 1622 | } | ||
1625 | if (m_closeView) | 1623 | if (m_closeView) | ||
1626 | m_closeView->hide(); | 1624 | m_closeView->hide(); | ||
1627 | 1625 | | |||
1628 | // Move all windows back to their original position | 1626 | // Move all windows back to their original position | ||
1629 | foreach (EffectWindow * w, m_motionManager.managedWindows()) | 1627 | foreach (EffectWindow * w, m_motionManager.managedWindows()) | ||
1630 | m_motionManager.moveWindow(w, w->geometry()); | 1628 | m_motionManager.moveWindow(w, w->geometry()); | ||
1631 | if (m_filterFrame) { | 1629 | if (m_filterFrame) { | ||
▲ Show 20 Lines • Show All 44 Lines • ▼ Show 20 Line(s) | 1673 | { | |||
1676 | if (!w->isOnCurrentActivity()) | 1674 | if (!w->isOnCurrentActivity()) | ||
1677 | return false; | 1675 | return false; | ||
1678 | if (w->isSpecialWindow() || w->isUtility()) | 1676 | if (w->isSpecialWindow() || w->isUtility()) | ||
1679 | return false; | 1677 | return false; | ||
1680 | if (w->isDeleted()) | 1678 | if (w->isDeleted()) | ||
1681 | return false; | 1679 | return false; | ||
1682 | if (!w->acceptsFocus()) | 1680 | if (!w->acceptsFocus()) | ||
1683 | return false; | 1681 | return false; | ||
1684 | if (!w->isCurrentTab()) | | |||
1685 | return false; | | |||
1686 | if (w->isSkipSwitcher()) | 1682 | if (w->isSkipSwitcher()) | ||
1687 | return false; | 1683 | return false; | ||
1688 | if (m_closeView && w == effects->findWindow(m_closeView->winId())) | 1684 | if (m_closeView && w == effects->findWindow(m_closeView->winId())) | ||
1689 | return false; | 1685 | return false; | ||
1690 | if (m_ignoreMinimized && w->isMinimized()) | 1686 | if (m_ignoreMinimized && w->isMinimized()) | ||
1691 | return false; | 1687 | return false; | ||
1692 | switch(m_mode) { | 1688 | switch(m_mode) { | ||
1693 | default: | 1689 | default: | ||
▲ Show 20 Lines • Show All 382 Lines • Show Last 20 Lines |