VirtualBox

Changeset 93367 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jan 20, 2022 5:18:22 PM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: Runtime UI / Machine-view: Fix for pause screenshot painting event, clipping should be used instead of manual rectangle calculation; This should also fix repainting artifacts for the notification-center being animated over the pause screenshot.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp

    r93366 r93367  
    16971697    if (!pausePixmap().isNull())
    16981698    {
    1699         /* We have a snapshot for the paused state: */
    1700         QRect rect = pPaintEvent->rect().intersected(viewport()->rect());
     1699        /* Create viewport painter: */
    17011700        QPainter painter(viewport());
     1701        /* Avoid painting more than necessary: */
     1702        painter.setClipRect(pPaintEvent->rect());
     1703        /* Can be NULL when the event arrive during COM cleanup: */
     1704        UIFrameBuffer *pFramebuffer = frameBuffer();
    17021705        /* Take the scale-factor into account: */
    1703         UIFrameBuffer * const pFramebuffer = frameBuffer(); /* Can be NULL when the event arrive during COM cleanup. */
    17041706        if (  pFramebuffer
    17051707            ? pFramebuffer->scaleFactor() == 1.0 && !pFramebuffer->scaledSize().isValid()
    17061708            : pausePixmapScaled().isNull())
    1707             painter.drawPixmap(rect.topLeft(), pausePixmap());
     1709            painter.drawPixmap(viewport()->rect().topLeft(), pausePixmap());
    17081710        else
    1709             painter.drawPixmap(rect.topLeft(), pausePixmapScaled());
     1711            painter.drawPixmap(viewport()->rect().topLeft(), pausePixmapScaled());
    17101712#ifdef VBOX_WS_MAC
    17111713        /* Update the dock icon: */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette