VirtualBox

Changeset 47804 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Aug 16, 2013 12:26:40 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
88065
Message:

Main: OnGuestMouse event cleanup.

Location:
trunk/src/VBox/Main
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r47774 r47804  
    2059620596  <enum
    2059720597    name="GuestMouseEventMode"
    20598     uuid="5eff2374-9a4e-4c47-aaee-8815e5ce58c2"
     20598    uuid="4b500146-ebba-4b7c-bc29-69c2d57a5caf"
    2059920599    >
    2060020600
     
    2061820618      </desc>
    2061920619    </const>
    20620 
    20621     <const name="MultiTouch" value="2">
    20622       <desc>
    20623         Multi-touch event.
    20624       </desc>
    20625     </const>
    2062620620  </enum>
    2062720621
    2062820622  <interface
    2062920623    name="IGuestMouseEvent" extends="IReusableEvent"
    20630     uuid="1f85d35c-c524-40ff-8e98-307000df0992"
     20624    uuid="179f8647-319c-4e7e-8150-c5837bd265f6"
    2063120625    wsmap="managed" autogen="VBoxEvent" id="OnGuestMouse"
    2063220626    >
     
    2066520659    </attribute>
    2066620660
    20667     <attribute name="contact" type="long" readonly="yes">
    20668       <desc>
    20669         The multi-touch contact identifier.  This remains valid as long as a
    20670         touch is in progress and can and should be re-used after a touch has
    20671         terminated (see @a buttons).
    20672       </desc>
    20673     </attribute>
    20674 
    2067520661    <attribute name="buttons" type="long" readonly="yes">
    2067620662      <desc>
    20677         Button state bitmask.  Multi-touch events should have the first bit set
    20678         as long as the touch is in progress and terminate with an event with no
    20679         bits set.
     20663        Button state bitmask.
    2068020664      </desc>
    2068120665    </attribute>
  • trunk/src/VBox/Main/include/MouseImpl.h

    r47571 r47804  
    128128
    129129    void fireMouseEvent(bool fAbsolute, LONG x, LONG y, LONG dz, LONG dw,
    130                         LONG cContact, LONG fButtons);
     130                        LONG fButtons);
    131131};
    132132
  • trunk/src/VBox/Main/src-client/MouseImpl.cpp

    r47798 r47804  
    118118    AssertComRCReturnRC(rc);
    119119    mMouseEvent.init(mEventSource, VBoxEventType_OnGuestMouse,
    120                      0, 0, 0, 0, 0);
     120                     0, 0, 0, 0, 0, 0);
    121121
    122122    /* Confirm a successful initialization */
     
    470470
    471471void Mouse::fireMouseEvent(bool fAbsolute, LONG x, LONG y, LONG dz, LONG dw,
    472                            LONG cContact, LONG fButtons)
     472                           LONG fButtons)
    473473{
    474474    /* If mouse button is pressed, we generate new event, to avoid reusable events coalescing and thus
    475475       dropping key press events */
     476    GuestMouseEventMode_T mode = fAbsolute? GuestMouseEventMode_Absolute: GuestMouseEventMode_Relative;
    476477    if (fButtons != 0)
    477478    {
    478479        VBoxEventDesc evDesc;
    479         evDesc.init(mEventSource, VBoxEventType_OnGuestMouse, fAbsolute, x, y,
    480                     dz, dw, cContact, fButtons);
     480        evDesc.init(mEventSource, VBoxEventType_OnGuestMouse, mode, x, y,
     481                    dz, dw, fButtons);
    481482        evDesc.fire(0);
    482483    }
    483484    else
    484485    {
    485         mMouseEvent.reinit(VBoxEventType_OnGuestMouse, fAbsolute, x, y, dz, dw,
    486                            cContact, fButtons);
     486        mMouseEvent.reinit(VBoxEventType_OnGuestMouse, mode, x, y, dz, dw,
     487                           fButtons);
    487488        mMouseEvent.fire(0);
    488489    }
     
    519520    rc = reportRelEventToMouseDev(dx, dy, dz, dw, fButtonsAdj);
    520521
    521     fireMouseEvent(false, dx, dy, dz, dw, 0, fButtons);
     522    fireMouseEvent(false, dx, dy, dz, dw, fButtons);
    522523
    523524    return rc;
     
    633634                                    & VMMDEV_MOUSE_NEW_PROTOCOL));
    634635
    635         fireMouseEvent(true, x, y, dz, dw, 0, fButtons);
     636        fireMouseEvent(true, x, y, dz, dw, fButtons);
    636637    }
    637638
     
    795796        rc = reportMultiTouchEventToDevice(cContacts, cContacts? pau64Contacts: NULL, (uint32_t)aScanTime);
    796797
    797         // @todo Implement. Maybe using a new TouchEvent rather than extending the mouse event.
     798        // @todo Implement using a new TouchEvent rather than extending the mouse event.
    798799        // fireMouseEvent(true, x, y, 0, 0, cContact, contactState);
    799800    }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette