VirtualBox

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


Ignore:
Timestamp:
Jul 29, 2011 3:42:26 PM (14 years ago)
Author:
vboxsync
Message:

main/mouse: correct abs mouse pointer calculation for windows guests (public bugs #7566, #9321)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/MouseImpl.cpp

    r36161 r38242  
    509509        /* Takes the display lock */
    510510        pDisplay->getFramebufferDimensions(&x1, &y1, &x2, &y2);
    511         *pcX = x1 != x2 ? (x - 1 - x1) * MOUSE_RANGE_UPPER / (x2 - x1) : 0;
    512         *pcY = y1 != y2 ? (y - 1 - y1) * MOUSE_RANGE_UPPER / (y2 - y1) : 0;
     511        *pcX = x1 < x2 ? (x - 1 - x1) * MOUSE_RANGE_UPPER / (x2 - x1 - 1) : 0;
     512        *pcY = y1 < y2 ? (y - 1 - y1) * MOUSE_RANGE_UPPER / (y2 - y1 - 1) : 0;
    513513        if (   *pcX < MOUSE_RANGE_LOWER || *pcX > MOUSE_RANGE_UPPER
    514514            || *pcY < MOUSE_RANGE_LOWER || *pcY > MOUSE_RANGE_UPPER)
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