Changeset 37889 in vbox for trunk/src/VBox/Additions/WINNT
- Timestamp:
- Jul 12, 2011 11:18:46 AM (14 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPTypes.h
r37626 r37889 70 70 typedef struct _VBOXWDDM_GLOBAL_POINTER_INFO 71 71 { 72 uint32_t iLastReportedScreen; 72 73 uint32_t cVisible; 73 74 } VBOXWDDM_GLOBAL_POINTER_INFO, *PVBOXWDDM_GLOBAL_POINTER_INFO; -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp
r37736 r37889 3421 3421 PVBOXWDDM_GLOBAL_POINTER_INFO pGlobalPointerInfo = &pDevExt->PointerInfo; 3422 3422 PVIDEO_POINTER_ATTRIBUTES pPointerAttributes = &pPointerInfo->Attributes.data; 3423 BOOLEAN bNotifyVisibility; 3423 BOOLEAN fScreenVisState = !!(pPointerAttributes->Enable & VBOX_MOUSE_POINTER_VISIBLE); 3424 BOOLEAN fVisStateChanged = FALSE; 3425 BOOLEAN fScreenChanged = pGlobalPointerInfo->iLastReportedScreen != pSetPointerPosition->VidPnSourceId; 3426 3424 3427 if (pSetPointerPosition->Flags.Visible) 3425 3428 { 3426 bNotifyVisibility = (pGlobalPointerInfo->cVisible == 0); 3427 if (!(pPointerAttributes->Enable & VBOX_MOUSE_POINTER_VISIBLE)) 3428 { 3429 pPointerAttributes->Enable |= VBOX_MOUSE_POINTER_VISIBLE; 3430 if (!fScreenVisState) 3431 { 3432 fVisStateChanged = !!pGlobalPointerInfo->cVisible; 3429 3433 ++pGlobalPointerInfo->cVisible; 3430 pPointerAttributes->Enable |= VBOX_MOUSE_POINTER_VISIBLE;3431 3434 } 3432 3435 } 3433 3436 else 3434 3437 { 3435 if (!!(pPointerAttributes->Enable & VBOX_MOUSE_POINTER_VISIBLE)) 3438 pPointerAttributes->Enable &= ~VBOX_MOUSE_POINTER_VISIBLE; 3439 if (fScreenVisState) 3436 3440 { 3437 3441 --pGlobalPointerInfo->cVisible; 3438 Assert(pGlobalPointerInfo->cVisible < UINT32_MAX/2); 3439 pPointerAttributes->Enable &= ~VBOX_MOUSE_POINTER_VISIBLE; 3440 bNotifyVisibility = (pGlobalPointerInfo->cVisible == 0); 3441 } 3442 } 3443 3444 pPointerAttributes->Column = pSetPointerPosition->X; 3445 pPointerAttributes->Row = pSetPointerPosition->Y; 3446 3447 if (bNotifyVisibility && VBoxQueryHostWantsAbsolute()) 3448 { 3449 // tell the host to use the guest's pointer 3450 VIDEO_POINTER_ATTRIBUTES PointerAttributes; 3451 3452 /* Visible and No Shape means Show the pointer. 3453 * It is enough to init only this field. 3454 */ 3455 PointerAttributes.Enable = pSetPointerPosition->Flags.Visible ? VBOX_MOUSE_POINTER_VISIBLE : 0; 3456 3457 BOOLEAN bResult = VBoxMPCmnUpdatePointerShape(VBoxCommonFromDeviceExt(pDevExt), &PointerAttributes, sizeof (PointerAttributes)); 3458 Assert(bResult); 3442 fVisStateChanged = !!pGlobalPointerInfo->cVisible; 3443 } 3444 } 3445 3446 pGlobalPointerInfo->iLastReportedScreen = pSetPointerPosition->VidPnSourceId; 3447 3448 if ((fVisStateChanged || fScreenChanged) && VBoxQueryHostWantsAbsolute()) 3449 { 3450 if (fScreenChanged) 3451 { 3452 BOOLEAN bResult = VBoxMPCmnUpdatePointerShape(VBoxCommonFromDeviceExt(pDevExt), &pPointerInfo->Attributes.data, VBOXWDDM_POINTER_ATTRIBUTES_SIZE); 3453 Assert(bResult); 3454 } 3455 else 3456 { 3457 // tell the host to use the guest's pointer 3458 VIDEO_POINTER_ATTRIBUTES PointerAttributes; 3459 3460 /* Visible and No Shape means Show the pointer. 3461 * It is enough to init only this field. 3462 */ 3463 PointerAttributes.Enable = pSetPointerPosition->Flags.Visible ? VBOX_MOUSE_POINTER_VISIBLE : 0; 3464 3465 BOOLEAN bResult = VBoxMPCmnUpdatePointerShape(VBoxCommonFromDeviceExt(pDevExt), &PointerAttributes, sizeof (PointerAttributes)); 3466 Assert(bResult); 3467 } 3459 3468 } 3460 3469 … … 3485 3494 if (vboxVddmPointerShapeToAttributes(pSetPointerShape, pPointerInfo)) 3486 3495 { 3496 pDevExt->PointerInfo.iLastReportedScreen = pSetPointerShape->VidPnSourceId; 3487 3497 if (VBoxMPCmnUpdatePointerShape(VBoxCommonFromDeviceExt(pDevExt), &pPointerInfo->Attributes.data, VBOXWDDM_POINTER_ATTRIBUTES_SIZE)) 3488 3498 Status = STATUS_SUCCESS;
Note:
See TracChangeset
for help on using the changeset viewer.