VirtualBox

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


Ignore:
Timestamp:
Mar 12, 2008 4:13:27 PM (17 years ago)
Author:
vboxsync
Message:

Additions/x11: set the graphics capability correctly for X.org 1.3 and 1.4

Location:
trunk/src/VBox/Additions/x11/xgraphics
Files:
3 edited

Legend:

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

    r7274 r7440  
    1616
    1717#include <VBox/VBoxGuest.h>
     18#include <VBox/VBoxDev.h>
    1819
    1920#include <xf86Pci.h>
     
    823824
    824825/**
     826 * Inform VBox that we are aware of advanced graphics functions
     827 * (i.e. dynamic resizing, seamless).
     828 *
     829 * @returns TRUE for success, FALSE for failure
     830 */
     831Bool
     832vboxEnableGraphicsCap(void)
     833{
     834    return RT_SUCCESS(VbglR3SetGuestCaps(VMMDEV_GUEST_SUPPORTS_GRAPHICS, 0));
     835}
     836
     837/**
     838 * Inform VBox that we are no longer aware of advanced graphics functions
     839 * (i.e. dynamic resizing, seamless).
     840 *
     841 * @returns TRUE for success, FALSE for failure
     842 */
     843Bool
     844vboxDisableGraphicsCap(void)
     845{
     846    return RT_SUCCESS(VbglR3SetGuestCaps(0, VMMDEV_GUEST_SUPPORTS_GRAPHICS));
     847}
     848
     849/**
    825850 * Query the last display change request.
    826851 *
  • trunk/src/VBox/Additions/x11/xgraphics/vboxvideo.h

    r7274 r7440  
    161161
    162162extern Bool vboxEnableVbva(ScrnInfoPtr pScrn);
     163extern Bool vboxDisableVbva(ScrnInfoPtr pScrn);
    163164
    164 extern Bool vboxDisableVbva(ScrnInfoPtr pScrn);
     165extern Bool vboxEnableGraphicsCap(void);
     166extern Bool vboxDisableGraphicsCap(void);
    165167
    166168extern Bool vboxGetDisplayChangeRequest(ScrnInfoPtr pScrn, uint32_t *pcx,
  • trunk/src/VBox/Additions/x11/xgraphics/vboxvideo_13.c

    r7274 r7440  
    925925            xf86DrvMsg(scrnIndex, X_INFO,
    926926                      "The VBox video extensions are now enabled.\n");
     927        vboxEnableGraphicsCap();
    927928    } else
    928929        xf86DrvMsg(scrnIndex, X_ERROR, "Failed to open the VBox system device - make sure that the VirtualBox guest additions are properly installed.  If you are not sure, try reinstalling them.\n");
     
    947948    if (pVBox->useVbva == TRUE)
    948949        vboxDisableVbva(pScrn);
     950    vboxDisableGraphicsCap();
    949951}
    950952
     
    957959    if (pVBox->useVbva == TRUE)
    958960        vboxDisableVbva(pScrn);
     961    vboxDisableGraphicsCap();
    959962    if (pScrn->vtSema) {
    960963        VBOXSaveRestore(xf86Screens[scrnIndex], MODE_RESTORE);
     
    10751078        if (vboxEnableVbva(pScrn) != TRUE)  /* Bad but not fatal */
    10761079            pVBox->useVbva = FALSE;
     1080    vboxEnableGraphicsCap();
    10771081    return (TRUE);
    10781082}
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