[PULL] hw/xwin fixes + a warning fix
colin.harrison at virgin.net
Thu Jan 26 15:22:42 PST 2012
Looking into it further the code at the end of miPointerSetPosition() maybe
the cause of this...
/* In the event we actually change screen or we get confined, we just
* drop the float component on the floor
* FIXME: only drop remainder for ConstrainCursorHarder, not for screen
* crossings */
if (x != trunc(*screenx))
*screenx = x;
if (y != trunc(*screeny))
*screeny = y;
this was introduced at the same time the function switched to doubles.
If I revert those traps and then call the function...
void winEnqueueMotion(int x, int y)
double dx = (double)x;
double dy = (double)y;
miPointerSetPosition(g_pwinPointer, POINTER_RELATIVE, &dx, &dy);
x = trunc(dx);
y = trunc(dy);
valuators = x;
valuators = y;
valuator_mask_set_range(&mask, 0, 2, valuators);
QueuePointerEvents(g_pwinPointer, MotionNotify, 0,
POINTER_ABSOLUTE | POINTER_SCREEN, &mask);
I now get no problem...I could however do better by just using doubles for x
and y in the hw/xwin function headers and get rid of those hacky casts and
trunc()'s. Will now test that + use of POINTER_RELATIVE looks dodgy!
More information about the xorg-devel