Hi, On 27 January 2012 10:22, Colin Harrison <colin.harri...@virgin.net> wrote: > If I revert those traps and then call the function... > > void winEnqueueMotion(int x, int y) > { > int valuators[2]; > ValuatorMask mask; > double dx = (double)x; > double dy = (double)y; > > miPointerSetPosition(g_pwinPointer, POINTER_RELATIVE, &dx, &dy); > x = trunc(dx); > y = trunc(dy); > valuators[0] = x; > valuators[1] = 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!
Why are you actually calling miPointerSetPosition at all? QueuePointerEvents (-> GetPointerEvents -> positionSprite, both in dix/getevents.c) already do that for you. You can also avoid the need for the valuators[] array by just calling valuator_mask_set(&mask, 0, x); valuator_mask_set(&mask, 1, y); at which point your function gets very short indeed. Cheers, Daniel _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel