VirtualBox

Changeset 38274 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 2, 2011 10:14:57 AM (13 years ago)
Author:
vboxsync
Message:

Additions/x11/vboxmouse: some server versions round up pointer values differently to what I would expect; this time we shift in the right direction

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/vboxmouse/vboxmouse_15.c

    r38273 r38274  
    5959#include "product-generated.h"
    6060
     61enum
     62{
     63#if ABI_XINPUT_VERSION > SET_ABI_VERSION(2, 0)
     64/* The X server does (to my mind) incorrect rounding, so we adjust our range to
     65 * compensate. */
     66    ADJUST_RANGE = 32,
     67#else
     68    ADJUST_RANGE = 0,
     69#endif
     70    /** The minumum value our device can return */
     71    RANGE_MIN = ADJUST_RANGE,
     72    /** The maximum value our device can return */
     73    RANGE_MAX = 0xFFFF + ADJUST_RANGE
     74};
     75
    6176static void
    6277VBoxReadInput(InputInfoPtr pInfo)
     
    132147                               axis_labels[0],
    133148# endif
    134 /* The X server does (to my mind) incorrect rounding, hence the strange values.
    135  */
    136                                -32 /* min X */, 65503 /* max X */,
     149                               RANGE_MIN /* min X */, RANGE_MAX /* max X */,
    137150                               10000, 0, 10000
    138151# if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
     
    145158                               axis_labels[1],
    146159# endif
    147 /* The X server does (to my mind) incorrect rounding, hence the strange values.
    148  */
    149                                -32 /* min Y */, 65503 /* max Y */,
     160                               RANGE_MIN /* min Y */, RANGE_MAX /* max Y */,
    150161                               10000, 0, 10000
    151162# if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
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