VirtualBox

Changeset 27762 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 26, 2010 11:14:45 PM (15 years ago)
Author:
vboxsync
Message:

FE/Qt: fix the range used for reporting the absolute mouse position

File:
1 edited

Legend:

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

    r27757 r27762  
    32723272            QPoint cpnt = viewportToContents (aPos);
    32733273            if (cpnt.x() < 0) cpnt.setX (0);
    3274             else if (cpnt.x() > cw) cpnt.setX (cw);
     3274            else if (cpnt.x() > cw - 1) cpnt.setX (cw - 1);
    32753275            if (cpnt.y() < 0) cpnt.setY (0);
    3276             else if (cpnt.y() > ch) cpnt.setY (ch);
     3276            else if (cpnt.y() > ch - 1) cpnt.setY (ch - 1);
    32773277
    32783278            CMouse mouse = mConsole.GetMouse();
    3279             mouse.PutMouseEventAbsolute (cpnt.x(), cpnt.y(), wheelVertical,
    3280                                          wheelHorizontal, state);
     3279            mouse.PutMouseEventAbsolute (cpnt.x() + 1, cpnt.y() + 1,
     3280                                         wheelVertical, wheelHorizontal,
     3281                                         state);
    32813282            return true; /* stop further event handling */
    32823283        }
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