VirtualBox

Changeset 53408 in vbox for trunk/src


Ignore:
Timestamp:
Nov 28, 2014 11:57:37 AM (10 years ago)
Author:
vboxsync
Message:

Additions/x11: allow VBoxClient to send monitor disable events to the graphics driver and clean up slightly.

Location:
trunk/src/VBox/Additions/x11
Files:
2 edited

Legend:

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

    r52956 r53408  
    135135        pState->cSizeHints = iDisplay + 1;
    136136    }
    137     if ((!fChangeOrigin || fEnabled) && cx != 0 && cy != 0)
    138     {
    139         pState->paSizeHints[iDisplay] = (cx & 0xffff) << 16 | (cy & 0xffff);
     137    if (!fEnabled || (cx != 0 && cy != 0))
     138    {
     139        pState->paSizeHints[iDisplay] = (cx & 0x8fff) << 16 | (cy & 0x8fff);
     140        if (!fEnabled)
     141            pState->paSizeHints[iDisplay] = -1;
    140142        XChangeProperty(pState->pDisplay, DefaultRootWindow(pState->pDisplay),
    141143                        XInternAtom(pState->pDisplay, "VBOX_SIZE_HINTS", 0),
  • trunk/src/VBox/Additions/x11/vboxvideo/vboxutils.c

    r52235 r53408  
    253253        for (i = 0; i < prop->size && i < pVBox->cScreens; ++i)
    254254        {
    255             if (!((int32_t *)prop->data)[i])
     255            if (((int32_t *)prop->data)[i] == 0)
    256256                continue;
    257             pVBox->pScreens[i].aPreferredSize.cx = ((int32_t *)prop->data)[i] >> 16;
    258             pVBox->pScreens[i].aPreferredSize.cy = ((int32_t *)prop->data)[i] & 0xffff;
     257            else if (((int32_t *)prop->data)[i] < 0)
     258                pVBox->pScreens[i].afDisabled = true;
     259            else
     260            {
     261                pVBox->pScreens[i].aPreferredSize.cx =
     262                    ((int32_t *)prop->data)[i] >> 16;
     263                pVBox->pScreens[i].aPreferredSize.cy =
     264                    ((int32_t *)prop->data)[i] & 0x8fff;
     265            }
    259266        }
    260267}
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