Changeset 77485 in vbox
- Timestamp:
- Feb 27, 2019 1:25:37 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 129075
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/MouseImpl.cpp
r77452 r77485 668 668 ComAssertRet(pDisplay, E_FAIL); 669 669 670 if (x == -1 || y == -1) /* Report only. */ 671 return S_OK; 672 if (x != mcLastX || y != mcLastY) /* This covers out-of-range too. */ 673 { 674 if (x < 0x7fffffff && y < 0x7fffffff) 675 pDisplay->i_reportHostCursorPosition(x - 1, y - 1, false); 676 else /* Out of range. */ 677 pDisplay->i_reportHostCursorPosition(0, 0, true); 670 if (x != mcLastX || y != mcLastY) 671 { 672 pDisplay->i_reportHostCursorPosition(x - 1, y - 1, false); 678 673 } 679 674 return S_OK; … … 855 850 __PRETTY_FUNCTION__, x, y, dz, dw, aButtonState)); 856 851 852 DisplayMouseInterface *pDisplay = mParent->i_getDisplayMouseInterface(); 853 ComAssertRet(pDisplay, E_FAIL); 857 854 int32_t xAdj, yAdj; 858 855 uint32_t fButtonsAdj; 859 856 bool fValid; 860 857 858 /* If we are doing old-style (IRQ-less) absolute reporting to the VMM 859 * device then make sure the guest is aware of it, so that it knows to 860 * ignore relative movement on the PS/2 device. */ 861 i_updateVMMDevMouseCaps(VMMDEV_MOUSE_HOST_WANTS_ABSOLUTE, 0); 862 /* Detect out-of-range. */ 863 if (x == 0x7FFFFFFF && y == 0x7FFFFFFF) 864 { 865 pDisplay->i_reportHostCursorPosition(0, 0, true); 866 return S_OK; 867 } 868 /* Detect "report-only" (-1, -1). This is not ideal, as in theory the 869 * front-end could be sending negative values relative to the primary 870 * screen. */ 871 if (x == -1 && y == -1) 872 return S_OK; 861 873 /** @todo the front end should do this conversion to avoid races */ 862 874 /** @note Or maybe not... races are pretty inherent in everything done in … … 866 878 867 879 fButtonsAdj = i_mouseButtonsToPDM(aButtonState); 868 /* If we are doing old-style (IRQ-less) absolute reporting to the VMM869 * device then make sure the guest is aware of it, so that it knows to870 * ignore relative movement on the PS/2 device. */871 i_updateVMMDevMouseCaps(VMMDEV_MOUSE_HOST_WANTS_ABSOLUTE, 0);872 880 if (fValid) 873 881 {
Note:
See TracChangeset
for help on using the changeset viewer.