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