VirtualBox

Changeset 53527 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Dec 12, 2014 5:26:17 PM (10 years ago)
Author:
vboxsync
Message:

Additions/x11/vboxvideo: report monitor connected status to X11, based on the enabled state in the last mode hint.

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

Legend:

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

    r53516 r53527  
    217217        pVBox->pScreens[i].aPreferredSize.cx = 1024;
    218218        pVBox->pScreens[i].aPreferredSize.cy = 768;
     219        pVBox->pScreens[i].afConnected       = true;
    219220    }
    220221    /* Set up the first mode correctly to match the requested initial mode. */
     
    253254        for (i = 0; i < prop->size && i < pVBox->cScreens; ++i)
    254255        {
    255             if (((int32_t *)prop->data)[i] == 0)
    256             {
    257                 pVBox->pScreens[i].aPreferredSize.cx = 1024;
    258                 pVBox->pScreens[i].aPreferredSize.cy = 768;
    259             }
    260             else
     256            if (((int32_t *)prop->data)[i] != 0)
    261257            {
    262258                pVBox->pScreens[i].aPreferredSize.cx =
  • trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.c

    r53451 r53527  
    418418vbox_output_detect (xf86OutputPtr output)
    419419{
    420     (void) output;
    421     return XF86OutputStatusConnected;
     420    ScrnInfoPtr pScrn = output->scrn;
     421    VBOXPtr pVBox = VBOXGetRec(pScrn);
     422    uint32_t iScreen = (uintptr_t)output->driver_private;
     423    return   pVBox->pScreens[iScreen].afConnected
     424           ? XF86OutputStatusConnected : XF86OutputStatusDisconnected;
    422425}
    423426
  • trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.h

    r52199 r53527  
    162162    /** The current preferred resolution for the screen */
    163163    RTRECTSIZE aPreferredSize;
     164    /** Has this screen been enabled by the host? */
     165    Bool afConnected;
    164166};
    165167
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