Changeset View
Changeset View
Standalone View
Standalone View
scene.cpp
Show First 20 Lines • Show All 546 Lines • ▼ Show 20 Line(s) | 509 | for (QHash<WindowThumbnailItem*, QPointer<EffectWindowImpl> >::const_iterator it = wImpl->thumbnails().constBegin(); | |||
---|---|---|---|---|---|
547 | thumbData.setYTranslation(y); | 547 | thumbData.setYTranslation(y); | ||
548 | int thumbMask = PAINT_WINDOW_TRANSFORMED | PAINT_WINDOW_LANCZOS; | 548 | int thumbMask = PAINT_WINDOW_TRANSFORMED | PAINT_WINDOW_LANCZOS; | ||
549 | if (thumbData.opacity() == 1.0) { | 549 | if (thumbData.opacity() == 1.0) { | ||
550 | thumbMask |= PAINT_WINDOW_OPAQUE; | 550 | thumbMask |= PAINT_WINDOW_OPAQUE; | ||
551 | } else { | 551 | } else { | ||
552 | thumbMask |= PAINT_WINDOW_TRANSLUCENT; | 552 | thumbMask |= PAINT_WINDOW_TRANSLUCENT; | ||
553 | } | 553 | } | ||
554 | QRegion clippingRegion = region; | 554 | QRegion clippingRegion = region; | ||
555 | clippingRegion &= QRegion(wImpl->x(), wImpl->y(), wImpl->width(), wImpl->height()); | 555 | clippingRegion &= QRegion(wImpl->frameGeometry()); | ||
556 | adjustClipRegion(item, clippingRegion); | 556 | adjustClipRegion(item, clippingRegion); | ||
557 | effects->drawWindow(thumb, thumbMask, clippingRegion, thumbData); | 557 | effects->drawWindow(thumb, thumbMask, clippingRegion, thumbData); | ||
558 | } | 558 | } | ||
559 | } | 559 | } | ||
560 | 560 | | |||
561 | void Scene::paintDesktopThumbnails(Scene::Window *w) | 561 | void Scene::paintDesktopThumbnails(Scene::Window *w) | ||
562 | { | 562 | { | ||
563 | EffectWindowImpl *wImpl = static_cast<EffectWindowImpl*>(effectWindow(w)); | 563 | EffectWindowImpl *wImpl = static_cast<EffectWindowImpl*>(effectWindow(w)); | ||
Show All 16 Lines | 564 | for (QList<DesktopThumbnailItem*>::const_iterator it = wImpl->desktopThumbnails().constBegin(); | |||
580 | size.scale(item->width(), item->height(), Qt::KeepAspectRatio); | 580 | size.scale(item->width(), item->height(), Qt::KeepAspectRatio); | ||
581 | data *= QVector2D(size.width() / double(screenSize.width()), | 581 | data *= QVector2D(size.width() / double(screenSize.width()), | ||
582 | size.height() / double(screenSize.height())); | 582 | size.height() / double(screenSize.height())); | ||
583 | const QPointF point = item->mapToScene(item->position()); | 583 | const QPointF point = item->mapToScene(item->position()); | ||
584 | const qreal x = point.x() + w->x() + (item->width() - size.width())/2; | 584 | const qreal x = point.x() + w->x() + (item->width() - size.width())/2; | ||
585 | const qreal y = point.y() + w->y() + (item->height() - size.height()) / 2; | 585 | const qreal y = point.y() + w->y() + (item->height() - size.height()) / 2; | ||
586 | const QRect region = QRect(x, y, item->width(), item->height()); | 586 | const QRect region = QRect(x, y, item->width(), item->height()); | ||
587 | QRegion clippingRegion = region; | 587 | QRegion clippingRegion = region; | ||
588 | clippingRegion &= QRegion(wImpl->x(), wImpl->y(), wImpl->width(), wImpl->height()); | 588 | clippingRegion &= QRegion(wImpl->frameGeometry()); | ||
589 | adjustClipRegion(item, clippingRegion); | 589 | adjustClipRegion(item, clippingRegion); | ||
590 | data += QPointF(x, y); | 590 | data += QPointF(x, y); | ||
591 | const int desktopMask = PAINT_SCREEN_TRANSFORMED | PAINT_WINDOW_TRANSFORMED | PAINT_SCREEN_BACKGROUND_FIRST; | 591 | const int desktopMask = PAINT_SCREEN_TRANSFORMED | PAINT_WINDOW_TRANSFORMED | PAINT_SCREEN_BACKGROUND_FIRST; | ||
592 | paintDesktop(item->desktop(), desktopMask, clippingRegion, data); | 592 | paintDesktop(item->desktop(), desktopMask, clippingRegion, data); | ||
593 | s_recursionCheck = nullptr; | 593 | s_recursionCheck = nullptr; | ||
594 | } | 594 | } | ||
595 | } | 595 | } | ||
596 | 596 | | |||
▲ Show 20 Lines • Show All 604 Lines • Show Last 20 Lines |