Changeset 35871 in vbox
- Timestamp:
- Feb 7, 2011 1:19:21 PM (14 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/MouseImpl.h
r35638 r35871 130 130 const ComObjPtr<EventSource> mEventSource; 131 131 VBoxEventDesc mMouseEvent; 132 133 void fireMouseEvent(bool fAbsolute, LONG x, LONG y, LONG dz, LONG dw, LONG Buttons); 134 #else 135 void fireMouseEvent(bool fAbsolute, LONG x, LONG y, LONG dz, LONG dw, LONG Buttons) 136 {} 132 137 #endif 133 138 }; -
trunk/src/VBox/Main/src-client/MouseImpl.cpp
r35638 r35871 405 405 } 406 406 407 #ifndef VBOXBFE_WITHOUT_COM 408 void Mouse::fireMouseEvent(bool fAbsolute, LONG x, LONG y, LONG dz, LONG dw, LONG Buttons) 409 { 410 /* If mouse button is pressed, we generate new event, to avoid reusable events coalescing and thus 411 dropping key press events */ 412 if (Buttons != 0) 413 { 414 VBoxEventDesc evDesc; 415 evDesc.init(mEventSource, VBoxEventType_OnGuestMouse, fAbsolute, x, y, dz, dw, Buttons); 416 evDesc.fire(0); 417 } 418 else 419 { 420 mMouseEvent.reinit(VBoxEventType_OnGuestMouse, fAbsolute, x, y, dz, dw, Buttons); 421 mMouseEvent.fire(0); 422 } 423 } 424 #endif 425 426 407 427 /** 408 428 * Send a relative mouse event to the guest. … … 433 453 rc = reportRelEventToMouseDev(dx, dy, dz, dw, fButtons); 434 454 435 #ifndef VBOXBFE_WITHOUT_COM 436 mMouseEvent.reinit(VBoxEventType_OnGuestMouse, false, dx, dy, dz, dw, fButtons); 437 mMouseEvent.fire(0); 438 #endif 455 fireMouseEvent(false, dx, dy, dz, dw, buttonState); 439 456 440 457 return rc; … … 538 555 & VMMDEV_MOUSE_NEW_PROTOCOL)); 539 556 540 #ifndef VBOXBFE_WITHOUT_COM 541 mMouseEvent.reinit(VBoxEventType_OnGuestMouse, true, x, y, dz, dw, 542 fButtons); 543 mMouseEvent.fire(0); 544 #endif 557 fireMouseEvent(true, x, y, dz, dw, buttonState); 545 558 } 546 559
Note:
See TracChangeset
for help on using the changeset viewer.