Changeset 19614 in vbox
- Timestamp:
- May 12, 2009 12:27:21 PM (16 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Input/DevPS2.cpp
r12977 r19614 779 779 s->mouse_dy -= dy; 780 780 s->mouse_dz += dz; 781 #ifndef VBOX 781 782 /* XXX: SDL sometimes generates nul events: we delete them */ 782 783 if (s->mouse_dx == 0 && s->mouse_dy == 0 && s->mouse_dz == 0 && 783 784 s->mouse_buttons == buttons_state) 784 785 return; 786 #else 787 /* This issue does not affect VBox, and under some circumstances (which?) 788 * we may wish to send null events to make mouse integration work. */ 789 #endif 785 790 s->mouse_buttons = buttons_state; 786 791 -
trunk/src/VBox/Main/MouseImpl.cpp
r15716 r19614 59 59 { 60 60 mpDrv = NULL; 61 mLastAbsX = 0; 62 mLastAbsY = 0; 61 63 return S_OK; 62 64 } … … 315 317 fButtons |= PDMIMOUSEPORT_BUTTON_MIDDLE; 316 318 317 vrc = mpDrv->pUpPort->pfnPutEvent(mpDrv->pUpPort, 1, 1, dz, 318 fButtons); 319 /* This is a workaround. In order to alert the Guest Additions to the 320 * fact that the absolute pointer position has changed, we send a 321 * a minute movement event to the PS/2 mouse device. But in order 322 * to avoid the mouse jiggling every time the use clicks, we check to 323 * see if the position has really changed since the last mouse event. 324 */ 325 if ((mLastAbsX == mouseXAbs) && (mLastAbsY == mouseYAbs)) 326 vrc = mpDrv->pUpPort->pfnPutEvent(mpDrv->pUpPort, 0, 0, dz, 327 fButtons); 328 else 329 vrc = mpDrv->pUpPort->pfnPutEvent(mpDrv->pUpPort, 1, 1, dz, 330 fButtons); 331 mLastAbsX = mouseXAbs; 332 mLastAbsY = mouseYAbs; 319 333 if (RT_FAILURE (vrc)) 320 334 rc = setError (VBOX_E_IPRT_ERROR, -
trunk/src/VBox/Main/include/MouseImpl.h
r19239 r19614 106 106 107 107 LONG uHostCaps; 108 uint32_t mLastAbsX; 109 uint32_t mLastAbsY; 108 110 }; 109 111
Note:
See TracChangeset
for help on using the changeset viewer.