- Timestamp:
- May 21, 2008 10:05:35 AM (17 years ago)
- Location:
- trunk/src/VBox/Additions/x11
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/xgraphics/vboxutils.c
r8949 r9006 118 118 { 119 119 if ( !(fFeatures & VBOXGUEST_MOUSE_HOST_CANNOT_HWPOINTER) 120 && (fFeatures & VBOXGUEST_MOUSE_GUEST_CAN_ABSOLUTE)) 120 && (fFeatures & VBOXGUEST_MOUSE_GUEST_CAN_ABSOLUTE) 121 && (fFeatures & VBOXGUEST_MOUSE_HOST_CAN_ABSOLUTE) 122 ) 121 123 rc = TRUE; 122 124 } -
trunk/src/VBox/Additions/x11/xmouse/VBoxUtils.c
r8959 r9006 64 64 65 65 66 int VBoxMouseQueryPosition(unsigned int *puAbsXPos, unsigned int *puAbsYPos) 66 /** 67 * Query the absolute mouse position from the host 68 * @returns VINF_SUCCESS or iprt error if the absolute values could not 69 * be queried, or the host wished to use relative coordinates 70 * @param pcx where to return the pointer X coordinate 71 * @param pxy where to return the pointer Y coordinate 72 */ 73 int VBoxMouseQueryPosition(unsigned int *pcx, unsigned int *pcy) 67 74 { 68 int rc; 69 uint32_t pointerXPos; 70 uint32_t pointerYPos; 75 int rc = VINF_SUCCESS; 76 uint32_t cx, cy, fFeatures; 71 77 78 AssertPtrReturn(pcx, VERR_INVALID_PARAMETER); 79 AssertPtrReturn(pcy, VERR_INVALID_PARAMETER); 72 80 if (gDeviceOpenFailed) 73 return 2; 74 AssertPtrReturn(puAbsXPos, VERR_INVALID_PARAMETER); 75 AssertPtrReturn(puAbsYPos, VERR_INVALID_PARAMETER); 76 rc = VbglR3GetMouseStatus(NULL, &pointerXPos, &pointerYPos); 77 if (VBOX_SUCCESS(rc)) 81 rc = VERR_ACCESS_DENIED; 82 if (RT_SUCCESS(rc)) 83 rc = VbglR3GetMouseStatus(&fFeatures, &cx, &cy); 84 else 85 ErrorF("Error querying host mouse position! rc = %d\n", rc); 86 if ( RT_SUCCESS(rc) 87 && !(fFeatures & VBOXGUEST_MOUSE_HOST_CAN_ABSOLUTE)) 88 rc = VERR_NOT_SUPPORTED; 89 if (RT_SUCCESS(rc)) 78 90 { 79 *puAbsXPos = pointerXPos; 80 *puAbsYPos = pointerYPos; 81 return 0; 91 *pcx = cx; 92 *pcy = cy; 82 93 } 83 ErrorF("Error querying host mouse position! rc = %d\n", rc); 84 return 2; 94 return rc; 85 95 } 86 96
Note:
See TracChangeset
for help on using the changeset viewer.