Changeset View
Changeset View
Standalone View
Standalone View
scene.cpp
Show First 20 Lines • Show All 451 Lines • ▼ Show 20 Line(s) | 447 | { | |||
---|---|---|---|---|---|
452 | } | 452 | } | ||
453 | } | 453 | } | ||
454 | 454 | | |||
455 | void Scene::clearStackingOrder() | 455 | void Scene::clearStackingOrder() | ||
456 | { | 456 | { | ||
457 | stacking_order.clear(); | 457 | stacking_order.clear(); | ||
458 | } | 458 | } | ||
459 | 459 | | |||
460 | static Scene::Window *s_recursionCheck = NULL; | 460 | static Scene::Window *s_recursionCheck = nullptr; | ||
461 | 461 | | |||
462 | void Scene::paintWindow(Window* w, int mask, QRegion region, WindowQuadList quads) | 462 | void Scene::paintWindow(Window* w, int mask, QRegion region, WindowQuadList quads) | ||
463 | { | 463 | { | ||
464 | // no painting outside visible screen (and no transformations) | 464 | // no painting outside visible screen (and no transformations) | ||
465 | const QSize &screenSize = screens()->size(); | 465 | const QSize &screenSize = screens()->size(); | ||
466 | region &= QRect(0, 0, screenSize.width(), screenSize.height()); | 466 | region &= QRect(0, 0, screenSize.width(), screenSize.height()); | ||
467 | if (region.isEmpty()) // completely clipped | 467 | if (region.isEmpty()) // completely clipped | ||
468 | return; | 468 | return; | ||
▲ Show 20 Lines • Show All 119 Lines • ▼ Show 20 Line(s) | 567 | for (QList<DesktopThumbnailItem*>::const_iterator it = wImpl->desktopThumbnails().constBegin(); | |||
588 | const qreal y = point.y() + w->y() + (item->height() - size.height()) / 2; | 588 | const qreal y = point.y() + w->y() + (item->height() - size.height()) / 2; | ||
589 | const QRect region = QRect(x, y, item->width(), item->height()); | 589 | const QRect region = QRect(x, y, item->width(), item->height()); | ||
590 | QRegion clippingRegion = region; | 590 | QRegion clippingRegion = region; | ||
591 | clippingRegion &= QRegion(wImpl->x(), wImpl->y(), wImpl->width(), wImpl->height()); | 591 | clippingRegion &= QRegion(wImpl->x(), wImpl->y(), wImpl->width(), wImpl->height()); | ||
592 | adjustClipRegion(item, clippingRegion); | 592 | adjustClipRegion(item, clippingRegion); | ||
593 | data += QPointF(x, y); | 593 | data += QPointF(x, y); | ||
594 | const int desktopMask = PAINT_SCREEN_TRANSFORMED | PAINT_WINDOW_TRANSFORMED | PAINT_SCREEN_BACKGROUND_FIRST; | 594 | const int desktopMask = PAINT_SCREEN_TRANSFORMED | PAINT_WINDOW_TRANSFORMED | PAINT_SCREEN_BACKGROUND_FIRST; | ||
595 | paintDesktop(item->desktop(), desktopMask, clippingRegion, data); | 595 | paintDesktop(item->desktop(), desktopMask, clippingRegion, data); | ||
596 | s_recursionCheck = NULL; | 596 | s_recursionCheck = nullptr; | ||
597 | } | 597 | } | ||
598 | } | 598 | } | ||
599 | 599 | | |||
600 | void Scene::paintDesktop(int desktop, int mask, const QRegion ®ion, ScreenPaintData &data) | 600 | void Scene::paintDesktop(int desktop, int mask, const QRegion ®ion, ScreenPaintData &data) | ||
601 | { | 601 | { | ||
602 | static_cast<EffectsHandlerImpl*>(effects)->paintDesktop(desktop, mask, region, data); | 602 | static_cast<EffectsHandlerImpl*>(effects)->paintDesktop(desktop, mask, region, data); | ||
603 | } | 603 | } | ||
604 | 604 | | |||
▲ Show 20 Lines • Show All 76 Lines • ▼ Show 20 Line(s) | |||||
681 | 681 | | |||
682 | //**************************************** | 682 | //**************************************** | ||
683 | // Scene::Window | 683 | // Scene::Window | ||
684 | //**************************************** | 684 | //**************************************** | ||
685 | 685 | | |||
686 | Scene::Window::Window(Toplevel * c) | 686 | Scene::Window::Window(Toplevel * c) | ||
687 | : toplevel(c) | 687 | : toplevel(c) | ||
688 | , filter(ImageFilterFast) | 688 | , filter(ImageFilterFast) | ||
689 | , m_shadow(NULL) | 689 | , m_shadow(nullptr) | ||
690 | , m_currentPixmap() | 690 | , m_currentPixmap() | ||
691 | , m_previousPixmap() | 691 | , m_previousPixmap() | ||
692 | , m_referencePixmapCounter(0) | 692 | , m_referencePixmapCounter(0) | ||
693 | , disable_painting(0) | 693 | , disable_painting(0) | ||
694 | , shape_valid(false) | 694 | , shape_valid(false) | ||
695 | , cached_quad_list(NULL) | 695 | , cached_quad_list(nullptr) | ||
696 | { | 696 | { | ||
697 | } | 697 | } | ||
698 | 698 | | |||
699 | Scene::Window::~Window() | 699 | Scene::Window::~Window() | ||
700 | { | 700 | { | ||
701 | delete m_shadow; | 701 | delete m_shadow; | ||
702 | } | 702 | } | ||
703 | 703 | | |||
▲ Show 20 Lines • Show All 130 Lines • ▼ Show 20 Line(s) | |||||
834 | 834 | | |||
835 | void Scene::Window::disablePainting(int reason) | 835 | void Scene::Window::disablePainting(int reason) | ||
836 | { | 836 | { | ||
837 | disable_painting |= reason; | 837 | disable_painting |= reason; | ||
838 | } | 838 | } | ||
839 | 839 | | |||
840 | WindowQuadList Scene::Window::buildQuads(bool force) const | 840 | WindowQuadList Scene::Window::buildQuads(bool force) const | ||
841 | { | 841 | { | ||
842 | if (cached_quad_list != NULL && !force) | 842 | if (cached_quad_list != nullptr && !force) | ||
843 | return *cached_quad_list; | 843 | return *cached_quad_list; | ||
844 | WindowQuadList ret; | 844 | WindowQuadList ret; | ||
845 | qreal scale = 1.0; | 845 | qreal scale = 1.0; | ||
846 | if (toplevel->surface()) { | 846 | if (toplevel->surface()) { | ||
847 | scale = toplevel->surface()->scale(); | 847 | scale = toplevel->surface()->scale(); | ||
848 | } | 848 | } | ||
849 | 849 | | |||
850 | if (toplevel->clientPos() == QPoint(0, 0) && toplevel->clientSize() == toplevel->decorationRect().size()) | 850 | if (toplevel->clientPos() == QPoint(0, 0) && toplevel->clientSize() == toplevel->decorationRect().size()) | ||
▲ Show 20 Lines • Show All 307 Lines • Show Last 20 Lines |