Changeset 21923 in vbox for trunk/src/VBox/Additions/x11/vboxvideo
- Timestamp:
- Jul 31, 2009 8:01:47 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/vboxvideo/vboxutils.c
r21912 r21923 399 399 Bool rc = TRUE; 400 400 int vrc; 401 uint32_t fMouseFeatures = 0; 401 402 402 403 TRACE_ENTRY(); … … 411 412 } 412 413 pVBox->useDevice = rc; 414 /* We can't switch to a software cursor at will without help from 415 * VBoxClient. So tell that to the host and wait for VBoxClient to 416 * change this. */ 417 vrc = VbglR3GetMouseStatus(&fMouseFeatures, NULL, NULL); 418 if (RT_SUCCESS(vrc)) 419 VbglR3SetMouseStatus( fMouseFeatures 420 | VMMDEV_MOUSE_GUEST_NEEDS_HOST_CURSOR); 413 421 return rc; 414 422 } … … 531 539 } 532 540 533 /** 534 * This function is called to set the position of the hardware cursor. 535 * Since we already know the position (exactly where the host pointer is), 536 * we only use this function to poll for whether we need to switch from a 537 * hardware to a software cursor (that is, whether the user has disabled 538 * pointer integration). Sadly this doesn't work the other way round, 539 * as the server updates the software cursor itself without notifying us. 540 */ 541 541 542 static void 542 543 vbox_set_cursor_position(ScrnInfoPtr pScrn, int x, int y) 543 544 { 544 VBOXPtr pVBox = pScrn->driverPrivate; 545 546 if (pVBox->accessEnabled && !vbox_host_uses_hwcursor(pScrn)) 547 { 548 /* This triggers a cursor image reload, and before reloading, the X 549 * server will check whether we can "handle" the new cursor "in 550 * hardware". We can use this check to force a switch to a software 551 * cursor if we need to do so. */ 552 pScrn->EnableDisableFBAccess(pScrn->scrnIndex, FALSE); 553 pScrn->EnableDisableFBAccess(pScrn->scrnIndex, TRUE); 554 } 545 /* Nothing to do here, as we are telling the guest where the mouse is, 546 * not vice versa. */ 547 NOREF(pScrn); 548 NOREF(x); 549 NOREF(y); 555 550 } 556 551
Note:
See TracChangeset
for help on using the changeset viewer.