Changeset 7409 in vbox
- Timestamp:
- Mar 10, 2008 2:50:08 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 28842
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VBoxDev.h
r5999 r7409 61 61 /** the guest supports mapping guest to host windows */ 62 62 #define VMMDEV_GUEST_SUPPORTS_GUEST_HOST_WINDOW_MAPPING RT_BIT(1) 63 /** 64 * the guest graphical additions are active - used for fast activation 65 * and deactivation of certain graphical operations. 66 * The legacy VMMDevReq_ReportGuestCapabilities request sets this 67 * automatically, but VMMDevReq_SetGuestCapabilities does not. */ 68 #define VMMDEV_GUEST_SUPPORTS_GRAPHICS RT_BIT(2) 63 69 /** @} */ 64 70 -
trunk/include/VBox/VBoxGuest.h
r7233 r7409 149 149 VMMDevReq_GetDisplayChangeRequest2 = 54, 150 150 VMMDevReq_ReportGuestCapabilities = 55, 151 VMMDevReq_SetGuestCapabilities = 56, 151 152 #ifdef VBOX_HGCM 152 153 VMMDevReq_HGCMConnect = 60, … … 286 287 uint32_t caps; 287 288 } VMMDevReqGuestCapabilities; 289 290 /** guest capabilites structure */ 291 typedef struct 292 { 293 /** header */ 294 VMMDevRequestHeader header; 295 /** mask of capabilities to be added */ 296 uint32_t u32OrMask; 297 /** mask of capabilities to be removed */ 298 uint32_t u32NotMask; 299 } VMMDevReqGuestCapabilities2; 288 300 289 301 /** idle request structure */ -
trunk/src/VBox/Devices/VMMDev/VBoxDev.cpp
r6915 r7409 521 521 VMMDevReqGuestCapabilities *guestCaps = (VMMDevReqGuestCapabilities*)pRequestHeader; 522 522 523 /* Enable this automatically for guests using the old 524 request to report their capabilities. */ 525 /** @todo change this when we next bump the interface version */ 526 guestCaps->caps |= VMMDEV_GUEST_SUPPORTS_GRAPHICS; 523 527 if (pData->guestCaps != guestCaps->caps) 524 528 { … … 528 532 LogRel(("Guest Additions capability report: (0x%x) " 529 533 "VMMDEV_GUEST_SUPPORTS_SEAMLESS: %s " 530 "VMMDEV_GUEST_SUPPORTS_GUEST_HOST_WINDOW_MAPPING: %s\n", 534 "VMMDEV_GUEST_SUPPORTS_GUEST_HOST_WINDOW_MAPPING: %s" 535 "VMMDEV_GUEST_SUPPORTS_GRAPHICS: %s\n", 531 536 guestCaps->caps, 532 537 guestCaps->caps & VMMDEV_GUEST_SUPPORTS_SEAMLESS ? "yes" : "no", 533 guestCaps->caps & VMMDEV_GUEST_SUPPORTS_GUEST_HOST_WINDOW_MAPPING ? "yes" : "no")); 538 guestCaps->caps & VMMDEV_GUEST_SUPPORTS_GUEST_HOST_WINDOW_MAPPING ? "yes" : "no", 539 guestCaps->caps & VMMDEV_GUEST_SUPPORTS_GRAPHICS ? "yes" : "no")); 534 540 535 541 pData->pDrv->pfnUpdateGuestCapabilities(pData->pDrv, guestCaps->caps); 536 542 } 543 pRequestHeader->rc = VINF_SUCCESS; 544 } 545 break; 546 } 547 548 /* Change guest capabilities */ 549 case VMMDevReq_SetGuestCapabilities: 550 { 551 if (pRequestHeader->size != sizeof(VMMDevReqGuestCapabilities2)) 552 { 553 AssertMsgFailed(("VMMDev guest caps structure has invalid size!\n")); 554 pRequestHeader->rc = VERR_INVALID_PARAMETER; 555 } 556 else 557 { 558 VMMDevReqGuestCapabilities2 *guestCaps = (VMMDevReqGuestCapabilities2*)pRequestHeader; 559 560 pData->guestCaps |= guestCaps->u32OrMask; 561 pData->guestCaps &= ~guestCaps->u32NotMask; 562 563 LogRel(("Guest Additions capability report: (0x%x) " 564 "VMMDEV_GUEST_SUPPORTS_SEAMLESS: %s " 565 "VMMDEV_GUEST_SUPPORTS_GUEST_HOST_WINDOW_MAPPING: %s" 566 "VMMDEV_GUEST_SUPPORTS_GRAPHICS: %s\n", 567 pData->guestCaps, 568 pData->guestCaps & VMMDEV_GUEST_SUPPORTS_SEAMLESS ? "yes" : "no", 569 pData->guestCaps & VMMDEV_GUEST_SUPPORTS_GUEST_HOST_WINDOW_MAPPING ? "yes" : "no", 570 pData->guestCaps & VMMDEV_GUEST_SUPPORTS_GRAPHICS ? "yes" : "no")); 571 572 pData->pDrv->pfnUpdateGuestCapabilities(pData->pDrv, pData->guestCaps); 537 573 pRequestHeader->rc = VINF_SUCCESS; 538 574 } … … 2294 2330 pData->fu32AdditionsOk = false; 2295 2331 memset (&pData->guestInfo, 0, sizeof (pData->guestInfo)); 2296 pData->guestCaps = 0;2297 2332 2298 2333 memset (&pData->lastReadDisplayChangeRequest, 0, sizeof (pData->lastReadDisplayChangeRequest)); … … 2316 2351 pData->u32NewGuestFilterMask = 0; 2317 2352 pData->fNewGuestFilterMask = 0; 2353 2354 /* This is the default, as Windows and OS/2 guests take this for granted. */ 2355 /** @todo change this when we next bump the interface version */ 2356 pData->guestCaps = VMMDEV_GUEST_SUPPORTS_GRAPHICS; 2357 pData->pDrv->pfnUpdateGuestCapabilities(pData->pDrv, pData->guestCaps); 2318 2358 } 2319 2359 -
trunk/src/VBox/Main/GuestImpl.cpp
r5999 r7409 172 172 } 173 173 174 STDMETHODIMP Guest::COMGETTER(SupportsGraphics) (BOOL *aSupportsGraphics) 175 { 176 if (!aSupportsGraphics) 177 return E_POINTER; 178 179 AutoCaller autoCaller (this); 180 CheckComRCReturnRC (autoCaller.rc()); 181 182 AutoReaderLock alock (this); 183 184 *aSupportsGraphics = mData.mSupportsGraphics; 185 186 return S_OK; 187 } 188 174 189 STDMETHODIMP Guest::COMGETTER(MemoryBalloonSize) (ULONG *aMemoryBalloonSize) 175 190 { … … 327 342 mData.mSupportsSeamless = aSupportsSeamless; 328 343 } 344 345 void Guest::setSupportsGraphics (BOOL aSupportsGraphics) 346 { 347 AutoCaller autoCaller (this); 348 AssertComRCReturnVoid (autoCaller.rc()); 349 350 AutoLock alock (this); 351 352 mData.mSupportsGraphics = aSupportsGraphics; 353 } -
trunk/src/VBox/Main/VMMDevInterface.cpp
r6955 r7409 202 202 return; 203 203 204 Assert(!(newCapabilities & ~VMMDEV_GUEST_SUPPORTS_SEAMLESS));205 206 204 guest->setSupportsSeamless(BOOL (newCapabilities & VMMDEV_GUEST_SUPPORTS_SEAMLESS)); 205 guest->setSupportsGraphics(BOOL (newCapabilities & VMMDEV_GUEST_SUPPORTS_GRAPHICS)); 207 206 208 207 /* -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r7350 r7409 5139 5139 <interface 5140 5140 name="IGuest" extends="$unknown" 5141 uuid="c101f037-b03d-4bd4-bd25-381123980be2" 5141 uuid="d8556fca-81bc-12af-fca3-365528fa38ca" 5142 5142 5143 wsmap="suppress" 5143 5144 > … … 5188 5189 Flag whether seamless guest display rendering (seamless desktop 5189 5190 integration) is supported. 5191 </desc> 5192 </attribute> 5193 5194 <attribute name="supportsGraphics" type="boolean" readonly="yes"> 5195 <desc> 5196 Flag whether the guest is in graphics mode. If it is not, then 5197 seamless rendering will not work, resize hints are not immediately 5198 acted on and guest display resizes are probably not initiated by 5199 the guest additions. 5190 5200 </desc> 5191 5201 </attribute> -
trunk/src/VBox/Main/include/GuestImpl.h
r5999 r7409 58 58 STDMETHOD(COMGETTER(AdditionsVersion)) (BSTR *aAdditionsVersion); 59 59 STDMETHOD(COMGETTER(SupportsSeamless)) (BOOL *aSupportsSeamless); 60 STDMETHOD(COMGETTER(SupportsGraphics)) (BOOL *aSupportsGraphics); 60 61 STDMETHOD(COMGETTER(MemoryBalloonSize)) (ULONG *aMemoryBalloonSize); 61 62 STDMETHOD(COMSETTER(MemoryBalloonSize)) (ULONG aMemoryBalloonSize); … … 73 74 void setSupportsSeamless (BOOL aSupportsSeamless); 74 75 76 void setSupportsGraphics (BOOL aSupportsGraphics); 77 75 78 STDMETHOD(SetStatistic)(ULONG aCpuId, GuestStatisticType_T aStatistic, ULONG aStatVal); 76 79 … … 82 85 struct Data 83 86 { 84 Data() : mAdditionsActive (FALSE), mSupportsSeamless (FALSE) {} 87 Data() : mAdditionsActive (FALSE), mSupportsSeamless (FALSE), 88 /* Windows and OS/2 guests take this for granted */ 89 mSupportsGraphics (TRUE) {} 85 90 86 91 Bstr mOSTypeId; … … 88 93 Bstr mAdditionsVersion; 89 94 BOOL mSupportsSeamless; 95 BOOL mSupportsGraphics; 90 96 }; 91 97
Note:
See TracChangeset
for help on using the changeset viewer.