Changeset 38648 in vbox for trunk/src/VBox/Additions/x11/vboxmouse
- Timestamp:
- Sep 5, 2011 9:53:44 PM (13 years ago)
- Location:
- trunk/src/VBox/Additions/x11/vboxmouse
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/vboxmouse/VBoxUtils.c
r35398 r38648 49 49 } 50 50 51 rc = VbglR3GetMouseStatus(&fFeatures, NULL, NULL); 52 if (RT_SUCCESS(rc)) 53 rc = VbglR3SetMouseStatus( fFeatures 54 | VMMDEV_MOUSE_GUEST_CAN_ABSOLUTE); 51 rc = VbglR3SetMouseStatus(VMMDEV_MOUSE_GUEST_CAN_ABSOLUTE); 55 52 if (RT_FAILURE(rc)) 56 53 { … … 98 95 int VBoxMouseFini(void) 99 96 { 100 if (gDeviceOpenFailed)101 return VINF_SUCCESS;102 uint32_t fFeatures;103 int rc = VbglR3GetMouseStatus(&fFeatures, NULL, NULL);104 if (RT_SUCCESS(rc))105 rc = VbglR3SetMouseStatus( fFeatures106 & ~VMMDEV_MOUSE_GUEST_CAN_ABSOLUTE);107 97 VbglR3Term(); 108 return rc;98 return VINF_SUCCESS; 109 99 } -
trunk/src/VBox/Additions/x11/vboxmouse/VBoxUtils_68.c
r32831 r38648 90 90 int VBoxMouseInit(void) 91 91 { 92 VMMDevReqMouseStatus req;92 uint32_t fFeatures; 93 93 94 94 /* return immediately if already initialized */ … … 115 115 116 116 /* tell the host that we want absolute coordinates */ 117 vmmdevInitRequest((VMMDevRequestHeader*)&req, VMMDevReq_SetMouseStatus); 118 req.mouseFeatures = VMMDEV_MOUSE_GUEST_CAN_ABSOLUTE | VMMDEV_MOUSE_GUEST_NEEDS_HOST_CURSOR; 119 req.pointerXPos = 0; 120 req.pointerYPos = 0; 117 fFeatures = VMMDEV_MOUSE_GUEST_CAN_ABSOLUTE; 121 118 /** @todo r=bird: Michael, I thought we decided a long time ago that all these should be replaced by VbglR3. I assume this is just a leftover... */ 122 if (ioctl(g_vboxguestHandle, VBOXGUEST_IOCTL_VMMREQUEST(sizeof(req)), (void*)&req) < 0) 119 if (ioctl(g_vboxguestHandle, VBOXGUEST_IOCTL_SET_MOUSE_STATUS, &fFeatures) 120 < 0) 123 121 { 124 122 ErrorF("Error sending mouse pointer capabilities to VMM! rc = %d (%s)\n", … … 175 173 if (g_vboxguestHandle < 0) 176 174 return 0; 177 /* tell VMM that we no longer support absolute mouse handling */ 178 vmmdevInitRequest((VMMDevRequestHeader*)&req, VMMDevReq_SetMouseStatus); 179 req.mouseFeatures = 0; 180 req.pointerXPos = 0; 181 req.pointerYPos = 0; 182 /** @todo r=bird: Michael, ditto. */ 183 if (ioctl(g_vboxguestHandle, VBOXGUEST_IOCTL_VMMREQUEST(sizeof(req)), (void*)&req) < 0) 184 { 185 ErrorF("ioctl to vboxguest module failed, rc = %d (%s)\n", 186 errno, strerror(errno)); 187 } 188 175 /* Tell VMM that we no longer support absolute mouse handling - done 176 * automatically when we close the handle. */ 189 177 free(g_vmmreqMouseStatus); 190 178 g_vmmreqMouseStatus = NULL;
Note:
See TracChangeset
for help on using the changeset viewer.