VirtualBox

Changeset 47728 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 14, 2013 2:03:38 PM (11 years ago)
Author:
vboxsync
Message:

FE/Qt: Mouse handler: take screen origin into account.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp

    r47724 r47728  
    911911    QVector<LONG64> contacts(pTouchEvent->touchPoints().size());
    912912
     913    CFramebuffer framebuffer;
     914    LONG xShift = 0, yShift = 0;
     915    session().GetConsole().GetDisplay().GetFramebuffer(uScreenId, framebuffer, xShift, yShift);
     916
    913917    /* Pass all multi-touch events into guest: */
    914918    int iTouchPointIndex = 0;
     
    935939                    currentTouchPoint.x(), currentTouchPoint.y(), touchPoint.id(), iTouchPointState));
    936940
    937         contacts[iTouchPointIndex] = RT_MAKE_U64_FROM_U16((uint16_t)currentTouchPoint.x() + 1,
    938                                                           (uint16_t)currentTouchPoint.y() + 1,
     941        contacts[iTouchPointIndex] = RT_MAKE_U64_FROM_U16((uint16_t)currentTouchPoint.x() + 1 + xShift,
     942                                                          (uint16_t)currentTouchPoint.y() + 1 + yShift,
    939943                                                          RT_MAKE_U16(touchPoint.id(), iTouchPointState),
    940944                                                          0);
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