VirtualBox

Changeset 73698 in vbox


Ignore:
Timestamp:
Aug 15, 2018 5:12:09 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
124375
Message:

VMMDev: Reporting only updated mode hints in multimonitor display change request, bugref:8444

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/VMMDev/VMMDev.cpp

    r73641 r73698  
    15541554    if (pReq->eventAck == VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST)
    15551555    {
     1556        uint32_t cDisplaysOut = 0;
    15561557        /* Remember which resolution the client has queried, subsequent reads
    15571558         * will return the same values. */
     
    15611562
    15621563            pDCR->lastReadDisplayChangeRequest = pDCR->displayChangeRequest;
    1563             pDCR->fPending = false;
    1564         }
    1565 
     1564
     1565            if (pDCR->fPending)
     1566            {
     1567                if (cDisplaysOut < cDisplays)
     1568                    pReq->aDisplays[cDisplaysOut] = pDCR->lastReadDisplayChangeRequest;
     1569
     1570                cDisplaysOut++;
     1571                pDCR->fPending = false;
     1572            }
     1573        }
     1574
     1575        pReq->cDisplays = cDisplaysOut;
    15661576        pThis->displayChangeData.fGuestSentChangeEventAck = true;
    15671577    }
    1568 
    1569     /* Fill the guest request with monitor layout data. */
    1570     for (i = 0; i < cDisplays; ++i)
    1571     {
    1572         /* If not a response to a VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST, just
    1573          * read the last valid video mode hint. This happens when the guest X server
    1574          * determines the initial mode. */
    1575         DISPLAYCHANGEREQUEST const *pDCR = &pThis->displayChangeData.aRequests[i];
    1576         VMMDevDisplayDef const *pDisplayDef = pThis->displayChangeData.fGuestSentChangeEventAck ?
    1577                                                   &pDCR->lastReadDisplayChangeRequest :
    1578                                                   &pDCR->displayChangeRequest;
    1579         pReq->aDisplays[i] = *pDisplayDef;
     1578    else
     1579    {
     1580        /* Fill the guest request with monitor layout data. */
     1581        for (i = 0; i < cDisplays; ++i)
     1582        {
     1583            /* If not a response to a VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST, just
     1584             * read the last valid video mode hint. This happens when the guest X server
     1585             * determines the initial mode. */
     1586            DISPLAYCHANGEREQUEST const *pDCR = &pThis->displayChangeData.aRequests[i];
     1587            VMMDevDisplayDef const *pDisplayDef = pThis->displayChangeData.fGuestSentChangeEventAck ?
     1588                &pDCR->lastReadDisplayChangeRequest :
     1589                &pDCR->displayChangeRequest;
     1590            pReq->aDisplays[i] = *pDisplayDef;
     1591        }
    15801592    }
    15811593
Note: See TracChangeset for help on using the changeset viewer.

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