VirtualBox

Changeset 55471 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Apr 28, 2015 8:02:03 AM (10 years ago)
Author:
vboxsync
Message:

Additions/x11/vboxvideo: test for susceptibility to X.Org Server 1.3 RandR bug, works on all later server versions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.c

    r55450 r55471  
    8787# include "xf86Crtc.h"
    8888# include "xf86Modes.h"
     89/* For xf86RandR12GetOriginalVirtualSize(). */
     90# include "xf86RandR12.h"
    8991#endif
    9092/* For setting the root window property. */
     
    333335    unsigned cFirst = cScreen;
    334336    unsigned cLast = cScreen != 0 ? cScreen + 1 : pVBox->cScreens;
    335 
     337    int originalX, originalY;
     338
     339    /* Check that this code cannot trigger the resizing bug in X.Org Server 1.3.
     340     * See the work-around in PreInit. */
     341    xf86RandR12GetOriginalVirtualSize(pScrn, &originalX, &originalY);
     342    VBVXASSERT(originalX == VBOX_VIDEO_MAX_VIRTUAL && originalY == VBOX_VIDEO_MAX_VIRTUAL, (""));
    336343    for (i = cFirst; i < cLast; ++i)
    337344        if (pVBox->pScreens[i].paCrtcs->mode.HDisplay != 0 && pVBox->pScreens[i].paCrtcs->mode.VDisplay != 0)
     
    914921
    915922#ifdef VBOXVIDEO_13
    916     /* Work around a bug in the original X server modesetting code, which
    917      * took the first valid values set to these two as maxima over the
    918      * server lifetime. */
     923    /* Work around a bug in the original X server modesetting code, which took
     924     * the first valid values set to these two as maxima over the server
     925     * lifetime.  This bug was introduced on Feb 15 2007 and was fixed in commit
     926     * fa877d7f three months later, so it was present in X.Org Server 1.3. */
    919927    pScrn->virtualX = VBOX_VIDEO_MAX_VIRTUAL;
    920928    pScrn->virtualY = VBOX_VIDEO_MAX_VIRTUAL;
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