VirtualBox

Ignore:
Timestamp:
Jul 1, 2022 10:37:52 AM (2 years ago)
Author:
vboxsync
Message:

Additions: X11: VBoxClient --vmsvga: Use proper index when caching video modes, bugref:10222.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/VBoxClient/display-svga-x11.cpp

    r95467 r95468  
    13151315        /* A mode with required size was not found. Create a new one. */
    13161316        pModeInfo = createMode(paOutputs[iOutputIndex].width, paOutputs[iOutputIndex].height);
     1317        VBClLogInfo("create mode %s (%u) on output %d\n", pModeInfo->name, pModeInfo->id, iOutputIndex);
    13171318        fNewMode = true;
    13181319    }
     
    13301331        x11Context.pXRRAddOutputMode(x11Context.pDisplay, outputId, pModeInfo->id);
    13311332#endif
     1333
    13321334    /* If mode has been newly created, destroy and forget mode created on previous guest screen resize event. */
    13331335    if (   aPrevMode[iOutputIndex] > 0
     
    13351337        && fNewMode)
    13361338    {
    1337         VBClLogInfo("removing unused mode %u\n", aPrevMode[outputId]);
    1338 #ifdef WITH_DISTRO_XRAND_XINERAMA
    1339         XRRDeleteOutputMode(x11Context.pDisplay, outputId, aPrevMode[outputId]);
    1340         XRRDestroyMode(x11Context.pDisplay, aPrevMode[outputId]);
     1339        VBClLogInfo("removing unused mode %u from output %d\n", aPrevMode[iOutputIndex], iOutputIndex);
     1340#ifdef WITH_DISTRO_XRAND_XINERAMA
     1341        XRRDeleteOutputMode(x11Context.pDisplay, outputId, aPrevMode[iOutputIndex]);
     1342        XRRDestroyMode(x11Context.pDisplay, aPrevMode[iOutputIndex]);
    13411343#else
    13421344        if (x11Context.pXRRDeleteOutputMode)
    1343             x11Context.pXRRDeleteOutputMode(x11Context.pDisplay, outputId, aPrevMode[outputId]);
     1345            x11Context.pXRRDeleteOutputMode(x11Context.pDisplay, outputId, aPrevMode[iOutputIndex]);
    13441346        if (x11Context.pXRRDestroyMode)
    1345             x11Context.pXRRDestroyMode(x11Context.pDisplay, aPrevMode[outputId]);
     1347            x11Context.pXRRDestroyMode(x11Context.pDisplay, aPrevMode[iOutputIndex]);
    13461348#endif
    13471349        /* Forget destroyed mode. */
    1348         aPrevMode[outputId] = 0;
     1350        aPrevMode[iOutputIndex] = 0;
    13491351    }
    13501352
     
    13521354     * was not created by XRRCreateMode call. */
    13531355    if (fNewMode)
    1354         aPrevMode[outputId] = pModeInfo->id;
     1356        aPrevMode[iOutputIndex] = pModeInfo->id;
    13551357
    13561358    if (paOutputs[iOutputIndex].fPrimary)
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